Last updated
Last updated
Unlike Uniswap or other constant product AMMs, Stabull is a proactive AMM. Instead of waiting for arbitrageurs to align prices with other sources of liquidity, the Stabull AMM dynamically concentrates liquidity around an off chain FX oracle to provide lower slippage. This lends itself naturally to FX and RWA's where the majority of price discovery occurs off chain. As well as providing price improvement for traders and relieving peg pressure for token issuers, this model greatly reduces impermanent loss for LP's, because their liquidity is dynamically recentered around the oracle price, without leaking profit to arbitrageurs.
A Stabull pool (or pair) is a smart contract which manages a reserve of two fiat-backed, ERC-20 stablecoins. There are two main operations a user can perform on a Stabull pool...
Liquidity Providers (LPs) can deposit & withdraw Liquidity from pools, changing the total reserves of the two tokens.
Traders can Swap between the two tokens, changing the proportion of token reserves.
At launch, Stabull pools are deployed on Ethereum and Polygon, and quoted in USDC. See Contracts for smart contract addresses and the currently deployed pools. See Stablecoins for more information on the non-USD stablecoins that each pool contains.
An invariant is a mathematical property or relationship that remains unchanged under a set of operations. In the context of a decentralized exchange, the invariant defines the relationship between the balances of pool tokens and parameters, that remains unchanged after swapping, deposits or withdrawals. The Stabull invariant is a hybrid of constant product and constant sum invariant, resulting in a flattened curve when visualized with token balances on each axis.
Event | Affect | Invariant |
---|---|---|
Deposit or Withdrawal | the total reserves change. the proportion of reserves (and the swap price) remain the same. | the invariant ensures that deposits & withdrawals can only be made in the same proportion as the current pool reserves. |
Swap | the proportion of reserves, and therefore the swap price changes. | the invariant ensures that a swap cannot reduce the total reserves, although the spread collected on each swap will slightly increase total reserves. |
Oracle Update | liquidity is dynamically shifted around the oracle price. the swap price changes. | The oracle price is used to determine token proportions, slippage and halt boundary's. |
The oracle rate for each pool is determined by two oracle price feeds. One for each token in the pool:
the base oracle is the price of the fiat currency in USD e.g. TRY/USD
the quote oracle is the price of the quote stablecoin in USD e.g. USDC/USD
At present, oracles are supplied by Chainlink Data Feeds.