depositCollateral
- Updates s_collateralDeposited mapping
- transferFrom ETH/BTC user -> contract
redeemCollateral
- Updates s_collateralDeposited mapping
- transfer ETH/BTC contract -> user
mintDsc
- Updates s_DSCMinted mapping
- calls dsc.mint
burnDsc
- Updates s_DSCMinted mapping
- transferFrom dsc user -> contract
- calls dsc.burn
liquidate
- redeemCollateral's from under collateralize user -> liquidator
- burnDsc from liquidator
calculateHealthFactor depositCollateralAndMintDSC redeemCollateralForDSC
Flow:
-
Entering the system:
- depositCollateral
- mintDsc
-
Leaving the System
- _burnDsc
- redeemCollateral