Equations

# Staking

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

# Minting

Minting happens by allowing users to purchase a bond. This bond price is the Mint price.
$bond Price = 1 + Premium$
SB has an intrinsic value of 1 MIM, which is roughly equivalent to \$1. In order to make a profit from minting, Snowbank charges a premium for each minting action.
$Premium = debt Ratio * BCV$
The premium is derived from the debt ratio of the system and a scaling variable called BCV. BCV allows us to control the rate at which bond prices increase.
The premium determines profit due to the protocol and in turn, stakers. This is because new SB is minted from the profit and subsequently distributed among all stakers.
$debt Ratio = bondsOutstanding/SBSupply$
The debt ratio is the total of all SB promised to bonders divided by the total supply of SB. This allows us to measure the debt of the system.
$bondPayout_{reserveBond} = marketValue_{asset}\ /\ bondPrice$
Bond payout determines the number of SB sold to a minter. For reserve mints, the market value of the assets supplied by the minter is used to determine the bond payout. For example, if a user supplies 1000 MIM and the mint price is 250 MIM, the user will be entitled 4 SB.
$bondPayout_{lpBond} = marketValue_{lpToken}\ /\ bondPrice$
For liquidity mints, the market value of the LP tokens supplied by the minter is used to determine the bond payout. For example, if a user supplies 0.001 SB-AVAX LP token which is valued at 1000 MIM at the time of bonding, and the bond price is 250 MIM, the user will be entitled 4 SB.

# SB Supply

$SB_{supplyGrowth} = SB_{stakers} + SBE-_{bonders} + SB_ {DAO}$
SB supply does not have a hard cap. Its supply increases when:
• SB is minted and distributed to the stakers.
• SB is minted for the bonder. This happens whenever someone purchases a bond.
• SB is minted for the DAO. This happens whenever someone purchases a bond. The DAO gets the same number of SB as the bonder.
$SB_{stakers} = SB_{totalSupply} * rewardRate$
At the end of each epoch, the treasury mints SB at a set reward rate. These SB will be distributed to all the stakers in the protocol.
$SB_{bonders} = bondPayout$
Whenever someone purchases a bond, a set number of SB is minted. These SB will not be released to the minter all at once - they are vested to the bonder linearly over time. The bond payout uses a different formula for different types of bonds. Check the Minting section above to see how it is calculated.
$SB_{DAO} = SB_{bonders}$
The DAO receives the same amount of SB as the minter. This represents the DAO profit.

# Backing per SB

$SB_{backing} = treasuryBalance_{stablecoin} + treasuryBalance_{otherAssets}$
Every SB in circulation is backed by the Snowbank treasury. The assets in the treasury can be divided into two categories: stablecoin and non-stablecoin.
$treasuryBalance_{stablecoin} = BackingPerSB_{reserveBond} + BackingPerSB_{lpBond}$
The stablecoin balance in the treasury grows when bonds are sold. Backing per SB is calculated differently for different mints types.
$BackingPerSB_{reserveBond} = assetSupplied$
For reserve mints such as MIM minting, the Backing per SB simply equals to the amount of the underlying asset supplied by the minter.
$BackingPerSB_{lpBond} = 2sqrt(constantProduct) * (\%\ ownership\ of\ the\ pool)$
For LP Mints such as SB-AVAX Minting, the RBacking Per SB is calculated differently because the protocol needs to mark down its value. Why? The LP token pair consists of SB, and each SB in circulation will be backed by these LP tokens - there is a cyclical dependency. To safely guarantee all circulating SB are backed, the protocol marks down the value of these LP tokens.