Last updated 1 year ago
Was this helpful?
cache
updateState
get user's AToken balance + amount to withdraw
validateWithdraw: confirm user has sufficient balance and asset isActive
updateInterestRates
collateral check
burn ATokens
Ensure existing loans are collateralized
This function confirms user has sufficient balance meeting withdrawal requirements, and ensures the status of asset:
isActive
notPaused
checks status flags of asset
ensures that withdrawal amount is: 0<amount≤userBalance0 < amount \leq userBalance0<amount≤userBalance, else revert
To better understand getFlags, see: