How is the amount of interest determined when withdrawing?

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.

2 Likes