Skip to content

Failed ICS20 withdrawals use bridge address instead of rollup address #1439

@SuperFluffy

Description

@SuperFluffy

Refunds of failed ICS20 withdrawals use the bridge address instead of destination chain address.

The fix is to use Ics20WithdrawalFromRollup.rollup_return_address from here:

Below shows the problematic lines of code.

  1. execute_rollup_withdrawal_refund constructs a Deposit using a destination_address here:
    execute_deposit(state, bridge_address, denom, amount, destination_address).await?;
  2. the packet sender is then parsed as the bridge address AND the destination address:
    1. here the recipient var is set to packet.sender:
      let recipient = if is_refund {
      packet_data.sender.clone()
    2. here packet.sender is parsed as a bridge account:
      let bridge_account = packet_data.sender.parse().context(
  3. here we are passing in recipient as the destination_address and bridge_address as the bridge_address:
    execute_rollup_withdrawal_refund(
    state,
    bridge_account,
    &denom_trace,
    packet_amount,
    recipient,
  4. but they are the same value!

The comment on Deposit.destination_chain_address reads:

// the address on the destination chain which
// will receive the bridged funds
string destination_chain_address = 5;

┆Issue Number: ENG-771

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