Aura Finance
简体中文 (ZH)
简体中文 (ZH)
  • 🙌歡迎
  • 📖Aura
    • Aura是什么?
      • 关于 $BAL 质押者
      • 关于流动性提供者
      • 关于 $AURA 锁定
      • 费用
    • 治理
      • 多签成员组成
      • 多签权力
      • Gauge投票
    • 安全性
      • 风险
    • $AURA
      • 代币分配
        • 分配扩展程序
      • 锁仓投票权
  • 🛠️开发者 DEVELOPERS
    • 已部署的合約地址
    • Solidity API
      • AuraBalVault - 自动复投器
    • 基于Aura进行开发
    • 品牌指引
    • 常用教程
      • 查看Aura池的奖励代币/收益
      • 计算Aura池的收益APR
      • 池的加成計算
      • Aura Subgraphs
      • 预计的APRs計算
      • 取得Balancer LP价格
    • 常见问题
  • 🔗相关连结 LINKS
    • Twitter
    • Discord
    • 论坛
    • Github
    • Aura Finance官方网站
    • AURA 條款與細則
Powered by GitBook
On this page
  1. 开发者 DEVELOPERS
  2. 常用教程

查看Aura池的奖励代币/收益

Previous常用教程Next计算Aura池的收益APR

Last updated 2 years ago

  • 选择池子,移至“Info”标签,然后在Etherscan上打开奖励合约地址“Rewards Contract Address”。

  • rewardRate 是每秒的BAL奖励产生率

  • extraRewards(N) 是额外奖励的合约地址 (AURA, BAL, ie. LDO, bb-a-USD 以外)

  • AURA会按照所累积的BAL进行按比例的铸造。

    • 计算每个BAL可以获得多少AURA的公式:

    • 图表:

    • 以下是一个 TypeScript 的实作:

    export const getAuraMintAmount = (
      balEarned: number,
      global: Omit<Global, 'auraMinter' | 'auraMinterMinted'>,
    ) => {
      const reductionPerCliff = BigNumber.from(global.auraReductionPerCliff);
      const maxSupply = BigNumber.from(global.auraMaxSupply);
      const totalSupply = BigNumber.from(global.auraTotalSupply);
      const totalCliffs = BigNumber.from(global.auraTotalCliffs);
      const minterMinted = BigNumber.from(0);
     
      // e.g. emissionsMinted = 6e25 - 5e25 - 0 = 1e25;
      const emissionsMinted = totalSupply.sub(maxSupply).sub(minterMinted);
     
      // e.g. reductionPerCliff = 5e25 / 500 = 1e23
      // e.g. cliff = 1e25 / 1e23 = 100
      const cliff = emissionsMinted.div(reductionPerCliff);
     
      // e.g. 100 < 500
      if (cliff.lt(totalCliffs)) {
        // e.g. (new) reduction = (500 - 100) * 2.5 + 700 = 1700;
        // e.g. (new) reduction = (500 - 250) * 2.5 + 700 = 1325;
        // e.g. (new) reduction = (500 - 400) * 2.5 + 700 = 950;
        const reduction = totalCliffs.sub(cliff).mul(5).div(2).add(700);
        // e.g. (new) amount = 1e19 * 1700 / 500 =  34e18;
        // e.g. (new) amount = 1e19 * 1325 / 500 =  26.5e18;
        // e.g. (new) amount = 1e19 * 950 / 500  =  19e17;
        let amount = simpleToExact(balEarned).mul(reduction).div(totalCliffs);
     
        // e.g. amtTillMax = 5e25 - 1e25 = 4e25
        const amtTillMax = maxSupply.sub(emissionsMinted);
        if (amount.gt(amtTillMax)) {
          amount = amtTillMax;
        }
     
        return amount;
      }
     
      return BigNumber.from(0);
    };

请勿使用链上查询

在 AuraMinter.inflationProtectionTime() 过期之后,这个计算可能不再有效。

由以下连结查看 Solidity 库的实作(AuraMining):

🛠️
https://etherscan.io/address/0x744Be650cea753de1e69BF6BAd3c98490A855f52
https://etherscan.io/token/0xC0c293ce456fF0ED870ADd98a0828Dd4d2903DBF#code#F1#L85
https://docs.google.com/spreadsheets/d/16VSvgp-ejkra03ykyh-2nlxeCMEDvBZ-LFjuaQo6Ym8/
Screenshot 2022-11-01 at 10.53.01.png