Interpreting Exchange Rates
The sToken Exchange Rate is scaled by the difference in decimals between the sToken and the underlying asset.
Here is an example of finding the value of 1 cBAT in BAT with Web3.js JavaScript.
There is no underlying contract for ETH, so to do this with sETH, set underlyingDecimals
to 18.
To find the number of underlying tokens that can be redeemed for sTokens, multiply the number of sTokens by the above value oneSTokenInUnderlying
.
Last updated
Was this helpful?