Sovereign Pool 101
When building a new DEX/AMM design, there are several important decisions to consider:
- How are quotes being calculated during swaps (pricing logic)?
- How are LP positions represented?
- How are swap fees being calculated? Dynamic or static?
- Should the pool support rebase tokens?
- Where should LP reserves be kept: In the pool itself, or some external singleton contract, or a custom Market Maker vault which might provide liquidity to multiple DEXes/protocols upon request?
- Should the pool have an internal price oracle or custom data accummulator?
- Should deposits, withdrawals and swaps be fully permissionless, or should there be custom verification of credentials for some of these actions?
- Do we allow swaps against more than two tokens?
- Should the pool have a manager with special permissions? If so should it be able to charge fees on swaps?
- Should the pool participate in some incentivization scheme, joining some ecosystem of pools?
Sovereign Pool is a smart contract which allows one to pick any combination of design choices, while keeping the gas overhead and implementation complexity as low as possible. It contains the following key components:
- Liquidity Module
- Swap Fee Module (Optional)
- Oracle Module (Optional)
- Verifier Module (Optional)
- Sovereign Vault (Optional)