When refunding failed ics20 transfers, sequencer short circuits when it can determine that a refund is due to a failed ics20 transfer originating from a rollup:
|
if is_refund |
|
&& serde_json::from_str::<memos::v1alpha1::Ics20WithdrawalFromRollup>(&packet_data.memo) |
|
.is_ok() |
|
{ |
|
execute_withdrawal_refund_to_rollup(state, packet_data) |
|
.await |
|
.wrap_err("failed to execute rollup withdrawal refund")?; |
|
return Ok(()); |
|
} |
In execute_withdrawal_refund_to_rollup it subsequently does not check if sequencer is a source or sink for the refunded asset. This means that the asset will never be taken from the ics20 escrow channel.
This issue was found in a review of the refactor PR #1495.
┆Issue Number: ENG-816
When refunding failed ics20 transfers, sequencer short circuits when it can determine that a refund is due to a failed ics20 transfer originating from a rollup:
astria/crates/astria-sequencer/src/ibc/ics20_transfer.rs
Lines 424 to 432 in 1be156e
In
execute_withdrawal_refund_to_rollupit subsequently does not check if sequencer is a source or sink for the refunded asset. This means that the asset will never be taken from the ics20 escrow channel.This issue was found in a review of the refactor PR #1495.
┆Issue Number: ENG-816