Open code423n4 opened 1 year ago
trust1995 marked the issue as primary issue
trust1995 marked the issue as satisfactory
0xBugsy marked the issue as sponsor acknowledged
0xBugsy marked the issue as disagree with severity
Breaking of interoperability with dApps on the hosting chain, contrary to docs, justifies Med severity in my opinion.
trust1995 marked the issue as selected for report
0xBugsy marked the issue as sponsor confirmed
Lines of code
https://github.com/code-423n4/2023-05-maia/blob/54a45beb1428d85999da3f721f923cbf36ee3d35/src/ulysses-omnichain/VirtualAccount.sol#L41-L53
Vulnerability details
Impact
Certain functions require native tokens to be sent. These functions will revert.
Proof of Concept
According to the Sponsor, VirtualAccounts can "call any of the dApps present in the Root Chain (Arbitrum) e.g. Maia, Hermes, Ulysses AMM,Uniswap." However, this is not the case as
call()
is notpayable
and thus cannot send native tokens to other contracts. This is problematic because certain functions require native token transfers and will fail.Tools Used
Manual
Recommended Mitigation Steps
Consider creating a single
call()
function that has apayable
modifier and{value: msg.value}
. Be aware that sincecalls[i].target.call()
is in a loop, it is not advisable to add payable to the existingcall()
. This is becausemsg.value
may be used multiple times, and is unsafe.Assessed type
Payable