Fortress
Search…
Fortress Credit and Lending
FTS Tokenomics
Supplying Assets
Borrowing Assets
FAI Stablecoin (Depreciated)
Interest Rates
Governance
Forced Liquidations
Smart Contracts
Guides
Road Map
Protocol Documentation
Getting Started
fTokens
Mint
Redeem
Redeem Underlying
Borrow
Repay Borrow
Repay Borrow Behalf
Liquidate Borrow
Key Events
Error Codes
Exchange Rate
Get Cash
Total Borrow
Borrow Balance
Borrow Rate
Total Supply
Underlying Balance
Supply Rate
Reserve Factor
Unitroller
Security
Powered By
GitBook
Exchange Rate
Each fToken is convertible into an ever increasing quantity of the underlying asset, as interest accrues in the market. The exchange rate between an fToken and the underlying asset is equal to;
exchangeRate = (getCash() + totalBorrows() - totalReserves()) / totalSupply()
FBep20 / FBnb
function exchangeRateCurrent() returns (uint)
RETURN: The current exchange rate as an unsigned integer, scaled by 1e18
Solidity
FBep20 fToken = FToken(0x3FDA...);
uint exchangeRateMantissa = fToken.exchangeRateCurrent();
Web3 1.0
const fToken = FBnb.at(0x3FDB...);
const exchangeRate = (await fToken.methods.exchangeRateCurrent().call()) / 1e18;
Tip: note the use of call vs. send to invoke the function from off-chain without incurring gas costs.
Previous
Error Codes
Next
Get Cash
Last modified
1yr ago
Copy link
Outline
FBep20 / FBnb
Solidity
Web3 1.0