githubEdit

update IsolationMode debt

Overview

Drawing

The bool isolationModeAction was retrieved earlier, from getIsolationModeState.

If isolationModeAction is true, this implies that the incoming borrow action is an isolated borrow as well.

  • get current isolationModeTotalDebt (from reservesData mapping)

  • increment it by the incoming stable debt amount

  • assign the updated isolationModeTotalDebt to both:

    • reservesData[...].isolationModeTotalDebt

    • nextIsolationModeTotalDebt

On decimals:

The amount is divided by 10reserveDecimals10^{reserveDecimals}to standardise amount into the number of units of assets.

I.e.: amount (in wei)/ 10reserveDecimals10^{reserveDecimals} = amount (in units of asset)

circle-info
  • 1 USDC = 1e6

  • 1 Ether = 1e18

Last updated