Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 1.06 KB

Error codes of Compound’s `Comptroller.enterMarket`, `Comptroller.exitMarket` are not checked.md

File metadata and controls

27 lines (23 loc) · 1.06 KB

Compound’s enterMarket/exitMarket functions return an error code instead of reverting in case of failure.

DeFi Saver smart contracts never check for the error codes returned from Compound smart contracts.

Recommendation:

Caller contract should revert in case the error code is not 0


Slide Screenshot

004.jpg


Slide Text

  • ConsenSys DeFi Save Finding 5.3
  • Error Handling
  • Major Severity
  • Function Return Values
  • Unchecked Error Codes
  • Check Error Code
  • Revert if Necessary

References


Tags