Skip to content

Fee middleware #396

@crodriguezvega

Description

@crodriguezvega

Requirements document (coming soon...)
ICS-29 spec
Project board

ADRs

Milestones

Pre-releases

QA scenarios

Channel handshake

  • Check fee-enabled transfer channel handshake completes when both chains support fee middleware.
  • Check fee-enabled interchain channel handshake completes when both chains support fee middleware.

Check handshake is backwards compatible (one chain with fee middleware, other chain without fee middleware):

  • Check non-fee transfer channel handshake completes when started from the chain with fee middleware.
  • Check non-fee transfer channel handshake completes when started from the chain without fee middleware.
  • Check non-fee interchain account channel handshake completes when started from the chain with fee middleware.
  • Check non-fee interchain account channel handshake completes when started from the chain without fee middleware.

Token transfers with two chains that support fee middleware

Using MsgPayPacketFee:

  • When packet is incentivized from single sender AND token transfer succeeds, then recv, ack fees are paid.
  • When packet is incentivized from multiple senders AND token transfer succeeds, then recv, ack fees are paid.
  • When packet is incentivized from single sender AND token transfer times out, then timeout fees are paid.
  • When packet is incentivized from multiple senders AND token transfer times out, then timeout fees are paid.
  • When packet is incentivized from single sender AND counterparty payee address is not set AND token transfer succeeds, then recv fees are refunded.
  • When packet is incentivized from single sender AND payee is set AND token transfer succeeds, then ack fees are paid to payee address instead of relayer address.
  • When packet is incentivized from single sender AND payee is set AND token transfer times out, then timeout fees are paid to payee address instead of relayer address.
  • Incentivization with ledger.

Using MsgPayPacketFeeAsync:

  • When packet is incentivized from single sender AND token transfer succeeds, then recv, ack fees are paid.
  • When packet is incentivized from multiple senders AND token transfer succeeds, then recv, ack fees are paid.
  • When packet is incentivized from single sender AND token transfer times out, then timeout fees are paid.
  • When packet is incentivized from multiple senders AND token transfer times out, then timeout fees are paid.
  • When packet is incentivized from single sender AND counterparty payee address is not set AND token transfer succeeds, then recv fees are refunded.
  • When packet is incentivized from single sender AND payee is set AND token transfer succeeds, then ack fees are paid to payee address instead of relayer address.
  • When packet is incentivized from single sender AND payee is set AND token transfer times out, then timeout fees are paid to payee address instead of relayer address.
  • Escrow to an already complete packet is rejected.
  • Escrow to a packet that does not exist is rejected.
  • Incentivization with ledger.

Interchain accounts with two chains that support fee middleware

Using MsgPayPacketFee:

  • When packet is incentivized from single sender AND ICA message is executed by host, then recv, ack fees are paid.
  • When packet is incentivized from multiple senders AND ICA message is executed by host, then recv, ack fees are paid.
  • When packet is incentivized from single sender AND ICA message to host times out, then timeout fees are paid.
  • When packet is incentivized from multiple senders AND ICA message to host times out, then timeout fees are paid.
  • When packet is incentivized from single sender AND counterparty payee address is not set AND ICA message is executed by host, then recv fees are refunded.
  • When packet is incentivized from single sender AND payee is set AND ICA message is executed by host, then ack fees are paid to payee address instead of relayer address.
  • When packet is incentivized from single sender AND payee is set AND ICA message to host times out, then timeout fees are paid to payee address instead of relayer address.

Using MsgPayPacketFeeAsync:

  • When packet is incentivized from single sender AND ICA message is executed by host, then recv, ack fees are paid.
  • When packet is incentivized from multiple senders AND ICA message is executed by host, then recv, ack fees are paid.
  • When packet is incentivized from single sender AND ICA message to host times out, then timeout fees are paid.
  • When packet is incentivized from multiple senders AND ICA message to host times out, then timeout fees are paid.
  • When packet is incentivized from single sender AND counterparty payee address is not set AND ICA message is executed by host, then recv fees are refunded.
  • When packet is incentivized from single sender AND payee is set AND ICA message is executed by host, then ack fees are paid to payee address instead of relayer address.
  • When packet is incentivized from single sender AND payee is set AND ICA message to host times out, then timeout fees are paid to payee address instead of relayer address.
  • Escrow to an already complete packet is rejected.
  • Escrow to a packet that does not exist is rejected.

Migration

  • Test that genesis state can be correctly exported and imported.

Checklist

  • Internal audit(s).
  • External audit(s).
  • Documentation.
  • Swagger.
  • Integration with relayers:
    • Hermes
    • Rly

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions