Standard
Search…
Equations

Staking

deposit = withdrawal
Swaps between SDA and sSDA during staking and unstaking are always honored 1:1. The amount of SDA deposited into the staking contract will always result in the same amount of sSDA. And the amount of sSDA withdrawn from the staking contract will always result in the same amount of SDA.
rebase = 1 - ( sdaDeposits / sSDAOutstanding )
The treasury deposits SDA into the distributor. The distributor then deposits SDA into the staking contract, creating an imbalance between SDA and sSDA. sSDA is rebased to correct this imbalance between SDA deposited and sSDA outstanding. The rebase brings sSDA outstanding back up to parity so that 1 sSDA equals 1 staked SDA.

Swapping

swapPrice = 1 + Premium
SDA has an intrinsic value of 1 DAI, which is roughly equivalent to $1. In order to make a profit from swapping, Standard charges a premium for each swap.
Premium = debtRatio * SCV
The premium is derived from the debt ratio of the system and a scaling variable called SCV. SCV allows us to control the rate at which swap prices increase. The premium determines profit due to the protocol and in turn, stakers. This is because new SDA is minted from the profit and subsequently distributed among all stakers.
debtRatio = swapsOutstanding / sdaSupply
The debt ratio is the total of all SDA promised to swappers divided by the total supply of SDA. This allows us to measure the debt of the system.
swapPayoutreserveSwap = marketValueasset / swapPrice
Swap payout determines the number of SDA sold to a swapper. For reserve swaps, the market value of the assets supplied by the swapper is used to determine the swap payout. For example, if a user supplies 1000 DAI and the swap price is 250 DAI, the user will be entitled 4 SDA.
swapPayoutlpSwap = marketValuelpToken / swapPrice
For liquidity swaps, the market value of the LP tokens supplied by the swapper is used to determine the swap payout. For example, if a user supplies 0.001 SDA-ETH LP token which is valued at 1000 DAI at the time of swapping, and the swap price is 250 DAI, the user will be entitled 4 SDA.

SDA Supply

SDAsupplyGrowth = SDAStakers + SDASwappers + SDADAO ​
SDA supply does not have a hard cap. Its supply increases when: SDA is minted and distributed to the stakers. SDA is minted for the swapper. This happens whenever someone purchases a swap. SDA is minted for the DAO. This happens whenever someone purchases a swap. The DAO gets the same number of SDA as the swapper.
SDAstakers = SDAtotalSupply ∗ rewardRate
At the end of each epoch, the treasury mints SDA at a set reward rate. These SDA will be distributed to all the stakers in the protocol.
SDAswappers = swapPayout
Whenever someone purchases a swap, a set number of SDA is minted and staked while the swap purchaser will receive sSDA. These sSDA will not be released to the swapper all at once - they are vested to the swapper linearly over time.
SDADAO = SDAswappers ​
The DAO receives the same amount of SDA as the swapper. This represents the DAO profit.

Backing per SDA

SDAbacking = treasuryBalancestablecoin + treasuryBalanceotherAssets ​
Every SDA in circulation is backed by the Standard treasury. The assets in the treasury can be divided into 2 categories: stablecoins and other assets.
treasuryBalancestablecoin = SDABackingStablecoinSwap + SDABackingpSwapStablecoin ​
The stablecoin balance in the treasury grows when bonds are sold.
SDABackingStablecoinSwap = assetSupplied
For reserve assets such as the DAI swap, SDA Backing simply equals to the amount of the underlying asset supplied by the swapper.
SDABackingStablecoinlpSwap = 2sqrt (constantProduct) ∗ (% ownership of the pool)
For LP swaps such as SDA-ETH swap, the SDA Backing is calculated differently because the protocol needs to mark down its value. Why? The LP token pair consists of SDA, and each SDA in circulation will be backed by these LP tokens - there is a cyclical dependency. To safely guarantee all circulating SDA are backed, the protocol marks down the value of these LP tokens marking an expected “loss” on the books.