Interest per Epoch

As the APY represents the interest per annum, it is readable for humans. However, the distributed ledger has an internal clock counted in epochs and it is needed to translate APY into interest rate per epoch:

Epoch time

et - epoch time, set at 5 minutes on the Radix network

Borrow interest per epoch

r_borrow = (borrow_rate + 1) ^ (et / (365 * 24 * 60) - 1

Deposit interest per epoch

r_deposit = r_borrow * (1 - reserve_factor)

It is worth noting that the APY calculation is enabled by using the pow() function from the Scrypto Math package.

Last updated