feat/savax-pricer Adding sAVAX pricer
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
- [x] Is your code up to date with the spec?
- [x] Have you added your tests to the testing doc?