Post
Share your knowledge.
How do Turbos and Cetus DEXs calculate trading prices?
I'm curious about how decentralized exchanges (DEXs) like Turbos and Cetus calculate the prices for trading pairs. What mechanisms or algorithms do they use?
- SDKs and Developer Tools
Answers
4For more detailed information on how Turbos and Cetus specifically implement these mechanisms, you can refer to their documentation. Turbos has its documentation available at Turbos Docs, and Cetus can be found at Cetus Docs. These resources should provide enough info and technical implementation details.
DEXs like Turbos and Cetus primarily use Automated Market Maker (AMM) algorithms, rather than traditional order books. At their core, AMMs rely on a constant function formula, like x * y = k (constant product), to determine prices and liquidity. However, most modern DEXs, including Turbos and Cetus, utilize more advanced AMM models, specifically concentrated liquidity AMMs (similar to Uniswap v3). This allows liquidity providers to allocate their capital within specific price ranges, leading to deeper liquidity and higher capital efficiency around the current market price. When a trade occurs, the algorithm shifts the ratio of assets in the pool according to the constant function, which in turn calculates the new price based on the current reserves and the trade size.
While the specifics can vary, DEXs like Turbos and Cetus typically use automated market-making algorithms to determine the price of trading pairs. These algorithms often rely on smart contracts to automatically facilitate trades when liquidity providers offer to trade currency pairs at predefined rates. The price is usually determined by the ratio of the reserves of each token in a liquidity pool. When a trade is executed, the proportions of tokens in the pool change, which in turn affects the price.
Do you know the answer?
Please log in and share it.
Sui is a Layer 1 protocol blockchain designed as the first internet-scale programmable blockchain platform.
- How to Maximize Profit Holding SUI: Sui Staking vs Liquid Staking616
- Why does BCS require exact field order for deserialization when Move structs have named fields?65
- Multiple Source Verification Errors" in Sui Move Module Publications - Automated Error Resolution55
- Sui Move Error - Unable to process transaction No valid gas coins found for the transaction419
- Sui Transaction Failing: Objects Reserved for Another Transaction410