Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/savax-pricer Adding sAVAX pricer #454

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

fqlx
Copy link
Contributor

@fqlx fqlx commented Feb 15, 2022

Feature Name: sAvax Pricer

High Level Description

Opyn pricer to support sAVAX token on Avalanche.

sAvax is a token from the Benqi Finance team.

sAVAX uses a pool share system where the user's balance of sAVAX tokens is representative of the user's portion of the total AVAX in the whole system. The token contract keeps track of the sum of all staked AVAX and the amount of paid staking rewards, as well as the total number of minted sAVAX tokens. The ratio of these two (the exchange rate) determines the sAVAX valuation in terms of the underlying AVAX; the sAVAX tokens can always be redeemed for at least as many AVAX tokens as determined by the current exchange rate. This exchange rate changes over time, making 1 sAVAX more and more valuable as time goes on.

Contract: 0x2b2C81e08f1Af8835a78Bb2A90AE924ACE0eA4bE

Specific Changes:

  • feat/savax-pricer Adding sAVAX pricer
  • fix/avax-truffle-config Adding the avax chain id to the truffle-config
  • task/deploySAvaxPricer Adding sAvax pricer deploy script

Code

The contract has a helper function (getPooledAvaxByShares(1e18), returns how much the amount of sAVAX tokens given as the argument is worth in AVAX) that returns the exchange rate.

Documentation

  • Is your code up to date with the spec?
  • Have you added your tests to the testing doc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant