Skip to content

Refunding rollups on failed ics20 transfers does not check if sequencer is source or sink of an asset #1514

@SuperFluffy

Description

@SuperFluffy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingibcpertaining to ibc, including ics20sequencerpertaining to the astria-sequencer crate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions