Price Calculation

Like many DEXs, Oscarswap uses Constant product formula to price the assets in any given rule. In its true essence, The formula stipulates that the total quantity of liquidity must remain constant. That is the coefficient K in the formula. The two tokens invested in the liquidity pool are represented by X and Y. Those two tokens must always have the value K. As the value of Y grows, so must the value of X, and vice versa.

The formula determines the price of each transaction regardless of how much of either token is purchased or sold at any particular time.

For example, If the current value of X is less than the target value, some X assets must be purchased from the pool. Alternatively, if the price of X exceeds the desired price, some Y assets must be purchased from the pool to keep the product of the equation constant, thus maintaining the coefficient K.

However, Oscarswap uses an advanced version of the Constant product formula. That is to say, OscarSwap uses certain advancements to counter the drawbacks associated with this formula.

Oscarswap maintains the coefficient K by converting each take-in position into an equal volume of both tokens, thus protecting users from price manipulations. Secondly, it operates with price constraints, instead of price freefall.

Advanced CPF is implemented in our V2 DEX

Price oracles

Oscarswap also use On-chain Price oracles to get price quotes. A mutual consensus for Price Oracle is its efficiency in providing accurate pricing for crypto assets. Therefore, its use provides users with confidence and charges them accurate prices only.

Price oracel will be implemented in our upcoming V3 DEX

Last updated