Assets are transferred if the execute
call fails
#72
Labels
3 (High Risk)
bug
Something isn't working
duplicate
This issue or pull request already exists
sponsor confirmed
Yes, this is a problem and we intend to fix it.
Handle
shw
Vulnerability details
Impact
When the user calls
fulfill
with a non-zerocallTo
parameter, theTransactionManager
tries to callexecute
oncallTo
, and if the function call fails, the manager transferstoSend
amount of receiving assets toreceivingAddress
. However, since the assets may have been transferred before (when theaddFunds
call fails), the user could get twice thetoSend
amount assets as a result.Proof of Concept
Referenced code:
TransactionManager.sol#L405-L408
TransactionManager.sol#L424-L427
Recommended Mitigation Steps
Since the assets are approved or transferred to the
receivingAddress
before calling theexecute
function, the manager should not transfer assets again if theexecute
call fails.The text was updated successfully, but these errors were encountered: