Submitted by 0xTheC0der, also found by SpicyMeatball and oakcobalt
In case of a successful asD redemption flow, native gas tokens (CANTO) can become stuck in the ASDRouter contract.
A successful execution of lzCompose() ends with a call to _sendASD():
Thereby, one can distinguish 3 scenarios:
One cannot assume and the contract doesnt require that msg.value == 0 always holds in this case.
One cannot assume and the contract doesnt require that msg.value == _payload._feeForSend always holds in this case.
Furthermore, the present behaviour violates a protocol invariant, according to the README:
The diff below modifies the existing test case lzCompose: successful deposit and send on canto to demonstrate that excess msg.value is not refunded in case of a successful asD redemption flow.
Apply the following changes to the _sendASD() method in order to refund the remaining value (i.e. the native contract balance).
Note: Using transfer might not be an ideal choice, but this proposed solution in meant to be in analogy with the _refundToken(...) method.
ETH-Transfer
3docSec (judge) commented:
dsudit01 (Canto) confirmed
3docSec (judge) increased severity to High and commented:
SpicyMeatball (warden) commented:
3docSec (judge) commented:
