# Equations

## Staking

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

## Minting

Minting happens by allowing users to purchase a bond. This bond price is the Mint price.
$bond Price = 1 + Premium$
KRNO has an intrinsic value of 1 KDAI, which is roughly equivalent to \$1. In order to make a profit from minting, Kronos DAO 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 KRNO is minted from the profit and subsequently distributed among all stakers.
$debt Ratio = bondsOutstanding/KRNOsupply$
The debt ratio is the total of all KRNO promised to bonders divided by the total supply of KRNO. This allows us to measure the debt of the system.
$bondPayout_{reserveBond} = marketValue_{asset}\ /\ bondPrice$
Bond payout determines the number of KRNO 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 KDAI and the mint price is 250 KDAI , the user will be entitled 4 KRNO.
$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 KRNO-KDAI LP token which is valued at 1000 KDAI at the time of bonding, and the bond price is 250 KDAI, the user will be entitled 4 KRNO.

## KRNO Supply

$KRNO_{supplyGrowth} = KRNO_{stakers} + KRNO_{minters} + KRNO_ {DAO}$
KRNO supply does not have a hard cap. Its supply increases when:
• KRNO is minted and distributed to the stakers.
• KRNO is minted for the minter. This happens whenever someone purchases a bond.
• KRNO is minted for the DAO. This happens whenever someone purchases a bond. The DAO gets the same number of KRNO as the minter.
$KRNO_{stakers} = KRNO_{totalSupply} * rewardRate$
At the end of each epoch, the treasury mints KRNO at a set reward rate. These KRNO will be distributed to all the stakers in the protocol.
$KRNO_{bonders} = bondPayout$
Whenever someone purchases a bond, a set number of KRNO is minted. These KRNO 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.
$KRNO_{DAO} = KRNO_{bonders}$
The DAO receives the same amount of KRNO as the minter. This represents the DAO profit.

## Backing per KRNO

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