
Comet v1 created a solid foundation for users to engage with a weighted AMM implementation. An efficient set of smart contracts with an example frontend users may easily fork and build on top of was introduced. Comet v1 also set the stage for enhanced interoperability within the Soroban ecosystem, as our core smart contracts serve as a foundation for many other solutions to integrate/build on top of. This framework enables robust exchange of assets across a dynamic set of liquidity pools. However, while Comet v1 offers robustness, it lacks fluidity in regards to cost optimization, this impacts end user experience.
Enter Comet v2, a major upgrade that optimizes for low fees via order routing and the implementation of stableswap pools within the weighted pool AMM. Why router? A router is a user-friendly way to interact with an AMM, it handles the routing logic for facilitating swap and order execution. Having an efficient router can lower fees for end users significantly. This is especially important for a weighted pool AMM, as Comet will have a variety of pools with similar tokens of different weights. One pool may have XYZ token with a 20% weight, and another pool may also have XYZ token at a 50% weight. The router will find the most optimal path for swapping from token a to b, with the functionality of being able to route across a multitude of liquidity pools. This allows the user to have access to efficient swap routing without having to worry about using specific pools and thinking heavily about liquidity implications for simply swapping tokens. The router takes weight distribution, liquidity, fees, and efficient path finding into account when facilitating a swap.
Why stableswap? Stablecoins have become a unique and integral part of capital liquidity throughout many DeFi ecosystems. Stableswap implementations allow for a novel approach to reducing fees and enhancing price stability. Having an efficient stableswap implementation with the Comet weighted pool AMM would also allow for greater real world value within the DeFi ecosystem, as stablecoin issuers and/or protocols can confidently allocate liquidity within a plethora of weighted liquidity pools. Users also gain access to distributed risk profiles across multiple stablecoin pools, with the ability to group various types of stablecoins by weight while still benefiting from the low slippage associated with a stableswap liquidity pool. Stableswap pools also allow for more dynamic route pathing options within the router implementation.
In conclusion, Comet v2 introduces two major new features, a router and stableswap implementation. Users will have access to lower costs when they provide liquidity to and/or swap stablecoins (lower slippage and impermanent loss), as well as lower fees (efficient routing) via the router implementation. The net result will mean that regardless of what tokens users choose to swap, they will incur lower fees, and thus will enjoy a much greater end user experience.
$141.0K

