Skip to content

APR for Governance locked YAXIS #36

@getgouda

Description

@getgouda

YIP-14 passed, removing the YAXIS vault and instead giving emission drops for locking YAXIS into the Voting Escrow contract.
We should display the APR that a user can expect per veYAXIS below the claim button on the Governance page.

Screen Shot 2022-01-23 at 10 04 16 PM

A hook should be added to src/state/internal/hooks.ts to calculate the APR.

The Fee Distributor contract can be seen [here] (https://etherscan.io/address/0x2bedced99bc5ccca1e94f7b0b4dbe81f7be201b8#code) and here.

The Fee Distributor has rewards added by blocks, either at the current block or queued up for a future one.
This reward is split between all veYAXIS holders.

APR could be calculated from the following plugged into the APR formula:

  1. the percentage that a user represents of the total veYAXIS (use useVotingPower in src/state/wallet/hooks.ts)
  2. the total tokens given over a year, this could be estimated from the two most recent reward indices (rewards( numberOfRewards - 1 ) to rewards( numberOfRewards ). Including more indices would make this more accurate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions