Submitted by haxatron, also found by EV_om and ZanyBonzy
https://github.com/code-423n4/2024-05-olas/blob/main/tokenomics/contracts/staking/ArbitrumDepositProcessorL1.sol#L119-L192https://github.com/code-423n4/2024-05-olas/blob/main/tokenomics/contracts/staking/WormholeDepositProcessorL1.sol#L59-L98
In multiple bridges, in _sendMessage there is a cost variable which is usually obtained by calling the bridge integration gas price estimator.
The problem is that when msg.value > cost, since cost is usually dynamic, the msg.value - cost will not be refunded to the transaction originator.
For instance, for the Wormhole integrator below:
WormholeTargetDispenserL2.sol#L89-L124
A cost is returned from quoteEVMDeliveryPrice that reflects the gas cost of executing the cross-chain transaction for the given gas limit of gasLimitMessage. When this sendPayloadToEvm is called, cost amount will be sent for the cross-chain transaction, but the msg.value - cost will remain stuck and not refunded to the user.
This affects multiple areas of the codebase, see links to affected code.
msg.value - cost will remain stuck and not refunded to the user.
Refund msg.value - cost to tx.origin.
kupermind (Olas) confirmed
Olas mitigated
Varun_05 (warden) commented:
For this audit, 10 reports were submitted by wardens detailing low risk and non-critical issues. The report highlighted below by EV_om received the top score from the judge.
The following wardens also submitted reports: ZanyBonzy, fyamf, Rhaydden, anticl0ck, caglankaan, ChaseTheLight, capGoblin, shaflow2, and haxatron.
