TemplarDAO
  • Introduction
  • Basics
    • ❓General FAQ
    • βš”οΈStaking
    • πŸͺ™Bonding
  • Using Templar
    • Stake Your TEM
    • Purchase a Bond
    • Migrate to BSC
    • TM Bridge
    • Referral Program
  • Protocol Internals
    • Initial Network State
    • Policy
    • Market Dynamics
  • ROADMAP
    • Roadmap
  • Transparency
    • Tokenomics
    • Treasury Vaults
    • Merge LP
    • Buyback
    • Multi-Chain Liquidity Bootstrapping
    • Burn
  • Audit
    • CertiK
  • References
    • πŸ“–Glossary
    • βž•Equations
    • πŸ”‘Multisig
    • πŸ“Contracts BSC
      • Binance Smart Chain
      • MoonRiver
      • Harmony
    • πŸ“Contracts MOVR
    • πŸ“Contracts ONE
    • πŸ”—Important Links
  • TRANSLATIONS
    • πŸ‡¨πŸ‡³Chinese-δΈ­ζ–‡
    • πŸ‡«πŸ‡·French-franΓ§ais
    • πŸ‡©πŸ‡ͺGerman-Deutsch
Powered by GitBook
On this page
  • Staking
  • Bonding
  • TEM Supply
  • Backing per TEM
  1. References

Equations

Where all the magic happens

PreviousGlossaryNextMultisig

Last updated 3 years ago

Staking

deposit=withdrawaldeposit = withdrawaldeposit=withdrawal

Swaps between TEM and SWORD during staking and unstaking are always honored 1:1. The amount of TEM deposited into the staking contract will always result in the same amount of SWORD. And the amount of SWORD withdrawn from the staking contract will always result in the same amount of TEM.

rebase=1βˆ’(TEMdeposits/SWORDoutstanding)rebase = 1 - ( TEMdeposits / SWORDoutstanding )rebase=1βˆ’(TEMdeposits/SWORDoutstanding)

The treasury deposits TEM into the distributor. The distributor then deposits TEM into the staking contract, creating an imbalance between TEM and SWORD. SWORD is rebased to correct this imbalance between TEM deposited and SWORD outstanding. The rebase brings SWORD outstanding back up to parity so that 1 SWORD equals 1 staked TEM.

Bonding

bondPrice=1+Premiumbond Price = 1 + PremiumbondPrice=1+Premium

TEM has an intrinsic value of 1 BUSD, which is roughly equivalent to $1. In order to make a profit from bonding, Templar charges a premium for each bond.

The premium determines profit due to the protocol and in turn, stakers. This is because new TEM is minted from the profit and subsequently distributed among all stakers.

The debt ratio is the total of all TEM promised to bonders divided by the total supply of TEM. This allows us to measure the debt of the system.

TEM Supply

TEM supply does not have a hard cap. Its supply increases when:

  • TEM is minted and distributed to the stakers.

  • TEM is minted for the bonder. This happens whenever someone purchases a bond.

  • TEM is minted for the DAO. This happens whenever someone purchases a bond. The DAO gets the same number of TEM as the bonder.

The DAO receives the same amount of TEM as the bonder. This represents the DAO profit.

Backing per TEM

Every TEM in circulation is backed by the Templar treasury. The assets in the treasury can be divided into two categories: stablecoin and non-stablecoin.

For reserve bonds such as BUSD bond, the RFV simply equals to the amount of the underlying asset supplied by the bonder.

For LP bonds such as TEM-BUSD bond, the RFV is calculated differently because the protocol needs to mark down its value. Why? The LP token pair consists of TEM, and each TEM in circulation will be backed by these LP tokens - there is a cyclical dependency. To safely guarantee all circulating TEM are backed, the protocol marks down the value of these LP tokens, hence the name risk-free value (RFV).

Premium=debtRatioβˆ—BCVPremium = debt Ratio * BCVPremium=debtRatioβˆ—BCV

The premium is derived from the debt ratio of the system and a scaling variable called . BCV allows us to control the rate at which bond prices increase.

debtRatio=bondsOutstanding/TEMsupplydebt Ratio = bondsOutstanding/TEMsupplydebtRatio=bondsOutstanding/TEMsupply
bondPayoutreserveBond=marketValueassetΒ /Β bondPricebondPayout_{reserveBond} = marketValue_{asset}\ /\ bondPricebondPayoutreserveBond​=marketValueasset​ /Β bondPrice

Bond payout determines the number of TEM sold to a bonder. For , the market value of the assets supplied by the bonder is used to determine the bond payout. For example, if a user supplies 1000 BUSD and the bond price is 250 BUSD, the user will be entitled 4 TEM.

bondPayoutlpBond=marketValuelpTokenΒ /Β bondPricebondPayout_{lpBond} = marketValue_{lpToken}\ /\ bondPricebondPayoutlpBond​=marketValuelpToken​ /Β bondPrice

For , 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 TEM-BUSD LP token which is valued at 1000 BUSD at the time of bonding, and the bond price is 250 BUSD, the user will be entitled 4 TEM.

TEMsupplyGrowth=TEMstakers+TEMbonders+TEMDAOTEM_{supplyGrowth} = TEM_{stakers} + TEM_{bonders} + TEM_{DAO} TEMsupplyGrowth​=TEMstakers​+TEMbonders​+TEMDAO​
TEMstakers=TEMtotalSupplyβˆ—rewardRateTEM_{stakers} = TEM_{totalSupply} * rewardRateTEMstakers​=TEMtotalSupplyβ€‹βˆ—rewardRate

At the end of each epoch, the treasury mints TEM at a set . These TEM will be distributed to all the stakers in the protocol.

TEMbonders=bondPayoutTEM_{bonders} = bondPayoutTEMbonders​=bondPayout

Whenever someone purchases a bond, a set number of TEM is minted. These TEM 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 section above to see how it is calculated.

TEMDAO=TEMbondersTEM_{DAO} = TEM_{bonders}TEMDAO​=TEMbonders​
TEMbacking=treasuryBalancestablecoin+treasuryBalanceotherAssetsTEM_{backing} = treasuryBalance_{stablecoin} + treasuryBalance_{otherAssets}TEMbacking​=treasuryBalancestablecoin​+treasuryBalanceotherAssets​
treasuryBalancestablecoin=RFVreserveBond+RFVlpBondtreasuryBalance_{stablecoin} = RFV_{reserveBond} + RFV_{lpBond}treasuryBalancestablecoin​=RFVreserveBond​+RFVlpBond​

The stablecoin balance in the treasury grows when bonds are sold. is calculated differently for different bond types.

RFVreserveBond=assetSuppliedRFV_{reserveBond} = assetSuppliedRFVreserveBond​=assetSupplied
RFVlpBond=2sqrt(constantProduct)βˆ—(%Β ownershipΒ ofΒ theΒ pool)RFV_{lpBond} = 2sqrt(constantProduct) * (\%\ ownership\ of\ the\ pool)RFVlpBond​=2sqrt(constantProduct)βˆ—(%Β ownershipΒ ofΒ theΒ pool)
βž•
bonding
BCV
reserve bonds
liquidity bonds
reward rate
RFV