You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In pallets messenger and transaction-payment, the fee calculation for messages or transactions is delegated to the WeightToFee implementation which can be configured via runtime's configuration. This trait exposes the weight_to_fee() function which converts the weight (computation time) into a currency.
Currently, in Subspace IdentityFee is the only implementation used throughout the code base and specifically for messenger and transaction-payment pallets. Sine this implementation considers the exact weight for the fee which is does not take into account the current network’s economic conditions or congestion times.
Messenger and Transaction payment is expected to use WeightToFee conversion provided through Runtime parameters. Unfortunately, we have not finalized the runtime parameters yet. We will point to the PR here once we push the final Runtime parameters
Risk: Moderate severity
Issue
In pallets messenger and transaction-payment, the fee calculation for messages or transactions is delegated to the
WeightToFee
implementation which can be configured via runtime's configuration. This trait exposes theweight_to_fee()
function which converts the weight (computation time) into a currency.Currently, in Subspace IdentityFee is the only implementation used throughout the code base and specifically for messenger and transaction-payment pallets. Sine this implementation considers the exact weight for the fee which is does not take into account the current network’s economic conditions or congestion times.
Risk
This simplistic fee calculation can lead to weight fee underestimation and can be used by malicious network participants to spam the chain.
Mitigation
Implement the
WeightToFee
so that it dynamically adjusts the fee to reflect changes in the network’s requirements or economic conditions.The text was updated successfully, but these errors were encountered: