How does Atoken automatically accure its value?

Expert

Hey can anyone tell me how Aave atoken automatically accures its value?

Answers 1

Each borrowable asset has a liquidityIndex, which is constantly increasing at a rate determined by the amount of interest being paid by all borrowers. Every Aave aToken holder earns interest proportional to their share of the Aave pool, so their real-time balance is

scaledATokenBalance * liquidtyIndex

where

scaledATokenBalance = suppliedAmount / liquidityIndexAtTimeOfSupply

More info.