Skip to content

Latest commit

 

History

History
24 lines (21 loc) · 1.27 KB

Reentrancy and untrusted contract call in `mintMultiple`.md

File metadata and controls

24 lines (21 loc) · 1.27 KB

Missing checks and no reentrancy prevention allow untrusted contracts to be called from mintMultiple. This could be used by an attacker to drain the contracts.

Recommendation:

Short term, add checks that cause mintMultiple to revert if the amount is zero or the asset is not supported. Add a reentrancy guard to the mint, mintMultiple, redeem, and redeemAll functions. Long term, make use of Slither which will flag the reentrancy. Or even better, use Crytic and incorporate static analysis checks into your CI/CD pipeline. Add reentrancy guards to all non-view functions callable by anyone. Make sure to always revert a transaction if an input is incorrect. Disallow calling untrusted contracts.


Slide Screenshot

037.jpg


Slide Text

  • ToB Audit Origin Dollar Finding 10
  • Reentrancy
  • High Severity
  • mintMultiple Untrusted Contracts
  • Reentrancy Guard
  • No Untrusted Contracts

References


Tags