CompX Documentation
  • Welcome to CompX
    • Connecting to CompX
  • Portfolio Tracking
    • Portfolio Tracking Overview
  • Swap Router
    • Swap Router Overview
    • The CompX Router
    • CompX Router Layout
    • Performing a Swap
    • Minting fAssets
  • Token Streams
    • Token Streams Overview
      • Token stream UI
      • Receiving a Token Stream
      • Creating Token Streams
  • X-NFT
    • X-NFT Overview
    • X-NFT Current Status
  • xUSD
    • Overview
      • Vault Design
    • Tokenomics
      • Stability Mechanisms
        • Variable Interest Rate
        • xUSD Staking
      • Liquidation
        • Liquidation Example
        • Performing a Liquidation
      • Borrowing xUSD
      • Managing Debt
  • Staking pools
    • STAKING at CompX
    • Algorand Consensus Staking Overview
      • CompX Consensus Implementation
      • Understanding LSTs
      • Using CompX cAlgo
    • Using Time Locked Contracts
    • Using Injected Liquidity Contracts
    • Genesis Pools
      • Creating a Genesis Pool
      • Staking in a Genesis Pool
  • Governance
    • CompX Governance-Flux
    • Proposals
    • Voting
    • Maximizing Voting Power
  • Rewards
    • Overview
    • Earning Points
Powered by GitBook
On this page
  1. Staking pools
  2. Algorand Consensus Staking Overview

Understanding LSTs

Jack is the first user to mint cAlgo by depositing his Algo on the CompX node. He places 1000 Algo on the node. Since he has a claim on all of the Algo in the pool, he's distributed 1000 cAlgo. He could burn this at any time and get his 1000 Algo back.

Jack hodls his cAlgo until the CompX node proposes a block and is rewarded with 10 Algo. Because Jack is the only person who has deposited into the node, he has a claim on all of the reward Algo. There is now 1010 Algo and he still has 1000 cAlgo. At this point cAlgo has appreciated in value by 1%

1cAlgo=1.01Algo1 cAlgo = 1.01 Algo 1cAlgo=1.01Algo

Dianne sees how quickly his cAlgo has appreciated and wants in on the racket. She also deposits 1000 Algo onto the node, but due to the change in price of cAlgo, she'll receive a reduced number of cAlgo from the minting contract.

1000Algo∗(1cAlgo/1.01Algo)=990.099cAlgo1000 Algo *(1cAlgo/1.01 Algo) = 990.099cAlgo1000Algo∗(1cAlgo/1.01Algo)=990.099cAlgo

Note that despite not gaining cAlgo at a 1:1 rate anymore, if she were to turn around and immediately burn her cAlgo, she would get the full 1000 Algo that she's owed. To prove that to yourself, simply flip the direction of equation above.

After some period of time, the node proposes another block and is rewarded with another 10 Algo. There are now 2020 total Algo in the node and 1990.099 cAlgo in circulation. This means that the new price for cAlgo is

(2020Algo/1990.099cAlgo)=1.015Algo/cAlgo(2020 Algo/1990.099 cAlgo) = 1.015 Algo/cAlgo (2020Algo/1990.099cAlgo)=1.015Algo/cAlgo

Simple calculations show that if Jack pulls his entire stake, he will get a total of 1015 Algo, a profit of 1.5%. The same is true for Dianne, who would get 1005 Algo. A profit of 0.5%. Thinking about these simple numbers, it's not hard to come to the conclusion that the LST is tracking correctly by intuition. Jack gets all of the rewards the first block and gets half of the rewards the second block, netting him 15 Algo. Same is true for Diane, where she receives half of the second blocks rewards.

Complexity increases as more people add, get rewarded and we include the 8% fee in the calculation. However, it's sufficient to note that the smart contract, knowing the circulating supply and the amount of Algos on the node, can consistently and accurately price each minting transaction. Once the user has minted their cAlgo, they are locked in to get a piece of all subsequent rewards payouts from block proposal. The math is actually quite simple.

(Node Algo)/(Circulating cAlgo)=cAlgo Value(Node\ Algo)/(Circulating\ cAlgo) =cAlgo\ Value(Node Algo)/(Circulating cAlgo)=cAlgo Value

fg

PreviousCompX Consensus ImplementationNextUsing CompX cAlgo

Last updated 5 months ago