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.
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.
- ToB Audit Origin Dollar Finding 10
- Reentrancy
- High Severity
- mintMultiple Untrusted Contracts
- Reentrancy Guard
- No Untrusted Contracts
- Youtube Reference
- High Risk severity finding from ToB’s Audit of Origin Dollar