Swap
Last updated
Caér implements a decentralized swap mechanism inspired by Automated Market Maker (AMM) models, enabling seamless token exchanges within the Caér Pool. The workflow below describes the process of token swapping and liquidity provision on the platform. But how does Caér’s swap system enhance the lending and borrowing experience? Unlike traditional swaps, Caér’s decentralized swap mechanism is designed specifically to trade collateral assets. This means users must hold an active lending or borrowing position to access swap functionalities, ensuring capital efficiency and seamless liquidity management.
Liquidity Providers (LPs) deposit pairs of tokens (e.g., Token A and Token B) into the Caér Pool. In return, LPs receive Pool Tokens, which represent their share of the liquidity pool and entitle them to a proportion of the transaction fees generated from swaps.
The Caér Pool maintains reserves of the deposited tokens and continuously updates balances as users perform swap operations. Reserves are used to facilitate trades between Token A and Token B without relying on external order books.
Traders initiate swaps through the Caér Swap interface by selecting the tokens they wish to exchange—such as swapping Token A for Token B. But here’s what makes Caér unique: To access swap functionalities, users must hold an active lending or borrowing position. This ensures that swaps are directly integrated with the lending and borrowing protocol, providing capital efficiency and enhanced liquidity management. The swap functionality applies an Automated Market Maker (AMM) formula to determine the exchange rate, considering the current reserves of the involved tokens. Upon successful execution, the Caér Pool updates the reserves accordingly.
A small fee is applied to each swap, distributed to Liquidity Providers based on their share of the pool. These fees incentivize LPs to maintain liquidity within the pool, enhancing platform efficiency and accessibility.
LPs can withdraw their liquidity at any time by redeeming their Pool Tokens. Upon withdrawal, the provider receives their proportional share of the pool’s reserves along with any accumulated fees.
Caér integrates Supra Oracle to provide accurate, real-time price feeds for the tokens involved in swaps. These oracle feeds ensure the AMM pricing logic aligns with external market rates, preventing price manipulation and ensuring fair value exchanges—especially important for collateral asset swaps. During each swap, Supra Oracle verifies the current market value of Token A and Token B, enhancing the security and reliability of the platform.