# Equations

## Staking

$deposit = withdrawal$
Swaps between OHMD and sOHMD during staking and unstaking are always honored 1:1. The amount of $OHMD deposited into the staking contract will always result in the same amount of sOHMD. And the amount of sOHMD withdrawn from the staking contract will always result in the same amount of$OHMD.
$rebase = 1 - ( ohmdDeposits / sOHMDOutstanding )$
The treasury deposits $OHMD into the distributor. The distributor then deposits$OHMD into the staking contract, creating an imbalance between $OHMD and sOHMD. sOHMD is rebased to correct this imbalance between$OHMD deposited and sOHMD outstanding. The rebase brings sOHMD outstanding back up to parity so that 1 sOHMD equals 1 staked $OHMD. ## Bonding $bond Price = 1 + Premium$$OHMD has an intrinsic value of 1 $wDOGE. In order to make a profit from bonding, Olympus Doge charges a premium for each bond. $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 the new$OHMD is minted from the profit and subsequently distributed among all stakers.
$debt Ratio = bondsOutstanding/ohmdSupply$
The debt ratio is the total of all $OHMD promised to bonders divided by the total supply of$OHMD. This allows us to measure the debt of the system.
$bondPayout_{reserveBond} = marketValue_{asset}\ /\ bondPrice$
Bond payout determines the number of $OHMD sold to a bonder. For reserve bonds, the market value of the assets supplied by the bonder is used to determine the bond payout. For example, if a user supplies 1000 DAI and the bond price is 250 DAI, the user will be entitled 4$OHMD.
$bondPayout_{lpBond} = marketValue_{lpToken}\ /\ bondPrice$
For liquidity bonds, the market value of the LP tokens supplied by the bonder is used to determine the bond payout. For example, if a user supplies 0.001 OHMD-DOGE LP token which is valued at 1000 DAI at the time of bonding, and the bond price is 250 DAI, the user will be entitled 4 $OHMD. ##$OHMD Supply

$OHMD_{supplyGrowth} = OHMD_{stakers} + OHMD_{bonders} + OHMD_{DAO}$
$OHMD supply does not have a hard cap. Its supply increases when: •$OHMD is minted and distributed to the stakers.
• $OHMD is minted for the bonder. This happens whenever someone purchases a bond. •$OHMD is minted for the treasury. This happens whenever someone purchases a bond. The treasury gets the same number of GIZA as the bonder.
• GIZA is minted for the team or the treasury.
$OHMD_{stakers} = OHMD_{totalSupply} * rewardRate$
At the end of each epoch, the treasury mints $OHMD at a set reward rate. These$OHMD will be distributed to all the stakers in the protocol.
$OHMD_{bonders} = bondPayout$
Whenever someone purchases a bond, a set number of $OHMD is minted. These$OHMD will not be released to the bonder 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 bonding section above to see how it is calculated.
$OHMD_{DAO} = OHMD_{bonders}$
The treasury receives the same amount of $OHMD as the bonder. This represents the treasury profit. ## Backing per$OHMD

$OHMD_{backing} = treasuryBalance_{stablecoin} + treasuryBalance_{otherAssets}$
Every $OHMD in circulation is backed by the treasury. The assets in the treasury can be divided into two categories: stablecoin and non-stablecoin. $treasuryBalance_{stablecoin} = RFV_{reserveBond} + RFV_{lpBond}$ The stablecoin balance in the treasury grows when bonds are sold. RFV is calculated differently for different bond types. $RFV_{reserveBond} = assetSupplied$ For reserve bonds such as USDC bond, the RFV simply equals to the amount of the underlying asset supplied by the bonder. $RFV_{lpBond} = 2sqrt(constantProduct) * (\%\ ownership\ of\ the\ pool)$ For LP bonds such as OHMD-DOGE bond, the RFV is calculated differently because the protocol needs to mark down its value. Why? The LP token pair consists of$OHMD, and each $OHMD in circulation will be backed by these LP tokens - there is a cyclical dependency. To safely guarantee all circulating$OHMD are backed, the protocol marks down the value of these LP tokens, hence the name risk-free value (RFV).