docs
Searchโ€ฆ
๐Ÿ’ก
Game fund balancing mechanism
Game smart contract holds two types of funds:
  • active game fund โ€” UST collected from the usersโ€™ lost bets and used to settle
  • savings fund โ€” aUST obtained by depositing all UST collected in each game round above the certain threshold
Active game fund is initially formed by the proceeds from both private and public token sale stages. Once the game is launched, all bets made by the users are collected in the active fund, and the same fund is used for payouts to the winners.
MAX_CASHFLOW parameter, which is initially set by the admin and later will be decided by the DAO, determines how much excess UST is deposited into the savings fund after each game round. If the difference between the lost bets and the winning payouts in a given round is more than MAX_CASHFLOW, then this difference is converted into aUST through the Anchor protocol.
If the active game fund is insufficient to pay out all the winners, the required UST amount will be withdrawn from the savings fund on the Anchor protocol.
โ€‹
Details of the balancing process are outlined in the Game fund balancing process diagram.
Game fund balancing process diagram
Copy link
Edit on GitHub