Budget For All
BonusWindowは全てのStakeされたVaultShareTokenに対する報酬を規定できる
BudgetForAllの分配量はそのBonusWindowに対してStakeされているVault share tokenのドル換算資産量の比率に応じて配布量が決定される
Reward For Voting Winners
BonusWindowは任意の数のVoting勝者への報酬を規定することができる。
Voting勝者ごとの分配量は、RewardAmount[i] x ((VaultShareToken量 × stake期間) / total (VaultShareToken量 × stake期間)) 、Stakeしたトークンのドル価値とその期間の積の値の比率によって決まる
[x] Check the amount of deposit for the registration of the bonus_window if it matches the sum of budget_for_all and sum of rewards_for_winners
[x] Define the state that have all stakers addresses for bonus_window_id and vault_id with the name of ALL_STAKERS which has <bonus_window_id, (vault_id, address)>
[x] Modify Map type of VAULT_SHARE_STAKING to have bonus_window_id, vault_id and address info as a key
[x] Take price info of each vault share token in the arg of msg to calculate the distribution amount
[x] Define to the state to track the total number of index about voting_powers and staking_powers
[x] Include the voted token as a part of BonusWindow's budget_for_all
[x] Define the subject vaults of winners of voting
[x] Efficiently calculate the total index number to know the portion of each stakers's index
[x] Define the amount of the distribution for the stakers of winning vaults
[x] Define the amount of the distribution for budget_for_all
[x] Create the complete SendMsg for all subject of the result of BonusWindow
[x] Delete Staking data when BonusWindow that each staking is connected with is deleted
[x] Delete ALL_STAKERS when BonusWindow that each staking is connected with is deleted
design memo
Budget For All
BonusWindowは全てのStakeされたVaultShareTokenに対する報酬を規定できる BudgetForAllの分配量はそのBonusWindowに対してStakeされているVault share tokenのドル換算資産量の比率に応じて配布量が決定されるReward For Voting Winners
BonusWindowは任意の数のVoting勝者への報酬を規定することができる。
Voting勝者ごとの分配量は、RewardAmount[i] x ((VaultShareToken量 × stake期間) / total (VaultShareToken量 × stake期間)) 、Stakeしたトークンのドル価値とその期間の積の値の比率によって決まる
StakingはBonusWindowに対して行われるような機構で、登録後の数量、期間変更は不可能
各VaultShareTokenのドル価格は数量を決定する関数をトリガーする外部アクションに価格情報を持たせる
その他
Votingに使用されたトークンは、BonusWindow終了時にBudgetForAllに加算する形で、そのメカニズムに従って分配される