Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 658 Bytes

.notes.md

File metadata and controls

36 lines (26 loc) · 658 Bytes

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