From 9776943b1332c9e3b11da75265dddb1775cb91e9 Mon Sep 17 00:00:00 2001 From: srdtrk <59252793+srdtrk@users.noreply.github.com> Date: Thu, 18 Jan 2024 10:57:40 +0300 Subject: [PATCH] docs: added capital efficiency to fee docs (#5643) Co-authored-by: Carlos Rodriguez --- docs/docs/04-middleware/01-ics29-fee/03-msgs.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/docs/04-middleware/01-ics29-fee/03-msgs.md b/docs/docs/04-middleware/01-ics29-fee/03-msgs.md index d1b26238a17..b6f503c0c3c 100644 --- a/docs/docs/04-middleware/01-ics29-fee/03-msgs.md +++ b/docs/docs/04-middleware/01-ics29-fee/03-msgs.md @@ -35,6 +35,7 @@ type MsgPayPacketFee struct{ ``` The `Fee` message contained in this synchronous fee payment method configures different fees which will be paid out for `MsgRecvPacket`, `MsgAcknowledgement`, and `MsgTimeout`/`MsgTimeoutOnClose`. +The amount of fees escrowed in total is the denomwise maxiumum of `RecvFee + AckFee` and `TimeoutFee`. This is because we do not know whether the packet will be successfully received and acknowledged or whether it will timeout. ```go type Fee struct { @@ -83,8 +84,9 @@ Following diagram takes a look at the packet flow for an incentivized token tran ![feeflow.png](./images/feeflow.png) -- In the case of a successful transaction, `RecvFee` will be paid out to the designated counterparty payee address which has been registered on the receiver chain and sent back with the `MsgAcknowledgement`, `AckFee` will be paid out to the relayer address which has submitted the `MsgAcknowledgement` on the sending chain (or the registered payee in case one has been registered for the relayer address), and `TimeoutFee` will be reimbursed to the account which escrowed the fee. -- In case of a timeout transaction, `RecvFee` and `AckFee` will be reimbursed. The `TimeoutFee` will be paid to the `Timeout Relayer` (who submits the timeout message to the source chain). +- In the case of a successful transaction, `RecvFee` will be paid out to the designated counterparty payee address which has been registered on the receiver chain and sent back with the `MsgAcknowledgement`, `AckFee` will be paid out to the relayer address which has submitted the `MsgAcknowledgement` on the sending chain (or the registered payee in case one has been registered for the relayer address), and the remaining fees (if any) will be reimbursed to the account which escrowed the fee. (The reimbursed amount equals `EscrowedAmount - (RecvFee + AckFee)`). + +- In case of a timeout transaction, the `TimeoutFee` will be paid to the `Timeout Relayer` (who submits the timeout message to the source chain), and the remaining fees (if any) will be reimbursed to the account which escrowed the fee. (The reimbursed amount equals `EscrowedAmount - (TimeoutFee)`). > Please note that fee payments are built on the assumption that sender chains are the source of incentives — the chain that sends the packets is the same chain where fee payments will occur -- please see the [Fee distribution section](04-fee-distribution.md) to understand the flow for registering payee and counterparty payee (fee receiving) addresses.