How is the amount of interest determined when withdrawing?

Suppose that you supply 10 USDT in the day 1

This implies create a tx where you send 10 USDT and receive 10 aPolUSDT

On day 365 in the dashboard you can see that now you have 11 USDT (10% APY) and want withdraw all.

Then a transactions that call withdrawal method is created, you send 10 aPolUSDT and receive 11 USDT, how this 1USDT of interest is calculated?

For a more real example see this tx 0x5bcb11579fa60fa55ba83bdc0140aa9bafaa493d85cdb899a65a463551206871, send 3.202497 aPolUSDT and receive 3.20501 USDT how the 0.00251 of interest is calculated?


1 Like

In theory it’s this formula APY and APR - Developers

That said in practice it’s unusable as utilization and thus rate is highly dynamic so calculation via growth index SDKs - Developers is more realistic scenario. Especially as otherwise flash and portal fees would be ignored.
The pool essentially tracks the index on the accounts last action per asset so together with current index you can get the archived rate.