Add on chain data for fees paid for successfully relayed packets #3336
Labels
29-fee
icebox
Issues that we will not address for the time being
needs discussion
Issues that need discussion before they can be worked on
Summary
Currently no on chain information is stored about the relayer incentive fees paid for successfully relayed packets. This makes it difficult to know the fees that should be specified for both a human user and smart contract to ensure a given packet is relayed in a timely and cost effective manner.
Problem Definition
It is undesirable for IBC enabled smart contracts to have hard coded fee amounts, it would be preferable to dynamically change the
RecvFee
,AckFee
andTimeoutFee
based on information about recently successfully relayed packets. This would avoid under payment - which could result in packets not being relayed in a timely manner and additional fees needing to be added beyond what was originally specified, or over payment - wasting funds paying more than is needed to have the packet relayed.Smart contracts cannot query off-chain data to determine reasonable fee amounts for recently relayed packets so there needs to be some data on chain that can be used. Moreover, as different transactions will have different gas requirements, it would also be good to understand the per gas fee amounts to ensure successful delivery.
Proposal
There should be some on chain data stored aggregating the fees paid for successfully relayed packets within a certain time frame per unit gas the packets consumed. This could be a moving average for the previous x blocks, or something similar.
For Admin Use
The text was updated successfully, but these errors were encountered: