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
{{ message }}
This repository has been archived by the owner on Jul 7, 2021. It is now read-only.
Some assets, as allowed by the Relay Chain, will be accepted for the payment of transaction fees. The abstract logic should be handled in pallet-transaction-payment. This parachain will need the following:
Functions to allow/forbid the payment of transaction fees with a given AssetId
Function to set the DOT/KSM to Asset ratio with which to convert native fees
Privileged origins for these functions. Ideally setting the ratio has a unique origin that could be passed off to an oracle at some point in the future.
The text was updated successfully, but these errors were encountered:
We use this in HydraDX but! We have AMM to price/trade in the tx token. It will be quite hard to have correct pricing of transactions without an oracle since prices of tokens will probably fluctuate quite a lot after launching.
I'm looking into how to implement this and I'm unsure about what to do with the fees:
Do we automatically convert the fees (in assets) to DOT and credit it to the staking pot (like the current implementation) while dropping (i.e. burning) the corresponding amount of the asset? This will mint DOTs on Statemint, though.
Or do we collect the assets into the treasury (account for that asset) and then pay out DOTs as well as assets to collators which I imagine will lead to lots of small amounts of assets flying around.
Based on conversation with @gavofyork the initial plan for calculating the assets tx fees is the following pseudocode:
let maybe_asset_fee = if asset.is_sufficient{Some(asset.min_balance* dot_fee / Balances::existential_deposit())}else{None};
Meaning we will treat the minimum balance (in combination with the existential deposit) as a conversion ratio.
We don't need high fidelity prices as we just need to make sure that enough fees are paid to make it costly to attack.
Some assets, as allowed by the Relay Chain, will be accepted for the payment of transaction fees. The abstract logic should be handled in
pallet-transaction-payment
. This parachain will need the following:AssetId
The text was updated successfully, but these errors were encountered: