The StrategyOp::claimAndSwap
function calls external contracts (transmuter.claim and _swapUnderlyingToAsset) before updating the contract's state. This could potentially allow reentrancy attacks if the external contracts call back into the contract.
Severity: HIGH
Explanation: The claimAndSwap
function calls external contracts, that are:
transmuter.claim,
_swapUnderlyingToAsset
These external calls are being made before updating the contract's state which might potentially allow reentrancy attacks if the external contracts call back into the contract.
Reentrancy attacks could lead to unauthorized manipulation of the contract's state and potential loss of funds.
Manual Testing
Use the Checks-Effects-Interactions (CEI) pattern by updating the contract's state before making external calls.
Alternatively, use the ReentrancyGuard modifier from OpenZeppelin.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.