Comment on page
FTS Distributed Per Block (All Markets)
The Unitroller Storage contract’s fortressRate is an unsigned integer that indicates the rate at which the protocol distributes FTS to markets’ suppliers or borrowers, every BSC block. The value is the amount of FTS (in wei), per block, allocated for the markets. Note that not every market has FTS distributed to its participants (see Market Metadata).
The fortressRate indicates how much FTS goes to the suppliers or borrowers, so doubling this number shows how much FTS goes to all suppliers and borrowers combined. The code examples implement reading the amount of FTS distributed, per BSC block, to all markets.
uint public fortressRate;
Unitroller troll = Unitroller(0xABCD...);
// FTS issued per block to suppliers OR borrowers * (1 * 10 ^ 18)
uint fortressRate = troll.fortressRate();
// Approximate FTS issued per day to suppliers OR borrowers * (1 * 10 ^ 18)
uint fortressRatePerDay = fortressRate * 4 * 60 * 24;
// Approximate FTS issued per day to suppliers AND borrowers * (1 * 10 ^ 18)
uint fortressRatePerDayTotal = fortressRatePerDay * 2;
const unitroller = new web3.eth.Contract(unitrollerAbi, unitrollerAddress);
let fortressRate = await unitroller.methods.fortressRate().call();
fortressRate = fortressRate / 1e18;