Ocean Primitives

Ocean Primitives are a type of primitive designed to interact with the Ocean contract. At a minimum, they must implement the computeOutputAmount and computeInputAmount functions from the IOceanPrimitive interface.

Their main role is to compute exchange rates between an input and output token. This can take many forms, depending on the primitive. For instance, in the context of an AMM primitive, the primitive is tasked with determining the swap rate.

Conversely, the Ocean's responsibility lies in updating the relevant balances: of the users, the AMM, and any other associated primitives.

Last updated