Omniswap is a new highly capital-efficient AMM that enables deep liquidity for all staked SOL.
Staked SOL accounts cannot easily be swapped for SOL. What if we allowed instant unstake for staked SOL?
We envision an ecosystem of many different staked SOL derivative tokens. A big stumbling block to this is liquidity. Each staked SOL derivative token needs to have deep liquidity, otherwise DeFi protocols won’t integrate it. How can we solve this problem?
The design of Omniswap v0 is incredibly simple: it’s a single pool of SOL that provides instant unstake for any staked SOL account. There is a single unstake
instruction that takes a staked SOL account, reads the amount of lamports inside it, and gives the user an equivalent amount of lamports minus a fee.
Note that all SPL tokens are supported “for free” by first doing a delayed unstake to get a staked SOL account and then calling Omniswap’s unstake
instruction. This allows us to support instant unstake for all SPL stake pool tokens.
A single pool of SOL can service swaps for all validators and all SPL stake pools, which means more capital efficiency and less fragmented liquidity.
Compared to regular xSOL/SOL pools, there is no risk of impermanent/divergence loss.
At least in v0, the single pool of SOL can only service trades once, so the maximum capital efficiency is 100% per epoch.
We can mitigate this in the future by reselling stake accounts on the open market, possibly at a discount.