Concentrated Liquidity Automated Market Maker
Interest Protocol CLAMM is a decentralized exchange with the following features:
Stable Curve: A bonding curve specially designed for correlated assets. It combines the constant product invariant (k = x * y) with the constant sum invariant (k = x + y) via an amplifier to flatten the curve in the middle. You can read more about it here.
Volatile Curve: These pools track the prices of the assets via internal oracles using an exponential moving average. It concentrates the liquidity around that price.
Hooks: Inspired by , Interest Protocol CLAMM implements pool policies. Deployers can customize their pools by implementing custom computation before or after a swap or liquidity position change. This extends the pools to support a myriad of applications such as ERC404, fee on swap, limit orders, custom oracles, etc...
Public Good: Interest Protocol does not have access to the swap fees. They are all in control of the deployer of the pool. This makes the CLAMM into a public good. It acts as a venue for projects to own the revenue from their protocol coin volume.
Passive Liquidity Management: UniswapV3 requires liquidity providers to actively manage their liquidity to capture fees and reduce impermanent loss. The Interest CLAMM moves the liquidity around automatically. This facilitates liquidity provision for everyone.
One Sided Liquidity: Liquidity providers are not required to provide or remove both coins in a CLAMM pool. They are free to provide their preferred coin.
LpCoins: Liquidity in the CLAMM is represed by Coins instead of NFTs. This make sit more composable in DeFi because of its fungibility. You can easily price them by checking the liquidity in the DEX and vistual price.
Multi-coin Pools: CLAMM pools support more than 2 coins. This allows for more exotic and concentrated pairs.
Hooks follow the same design principle as Sui's Kiosk transfer policy. It allows developers to enforce rules to pools. The rules are completed by calling the rule's module and collecting its witness. Rules can be anything from custom oracles to fee on swap.
The CLAMM supports 8 hooks:
Start Swap: This hook must be completed before a swap transaction.
Finish Swap: A swap transaction must fulfill this hook to finish.
Start Add Liquidity: This hook must be completed before a user adds liquidity.
Finish Add Liquidity: A transaction to add liquidity must fulfill this hook to finish.
Pools are not required to have hooks and a pool can have a Start Swap hook without a Finish Swap hook. Hooks are set at deployment and cannot be changed afterwards.
We will provide a set of standard hooks that will be automatically resolved via the SDK. Please refer to them on how to use your own hooks!
Start Remove Liquidity: This hook must be completed before a user removes liquidity.
Finish Remove Liquidity: A transaction to remove liquidity must fulfill this hook to finish.
Start Donate: This hook must be completed before a swap transaction.
Finish Donate: A swap transaction must fulfill this hook to finish.