Skip to content

chore: remove insuficient asset ED and fee fallback to xyk pools - #1546

Merged
enthusiastmartin merged 11 commits into
masterfrom
feat/remove-fee-fallbacks
Oct 15, 2026
Merged

enthusiastmartin merged 11 commits into
masterfrom
feat/remove-fee-fallbacks

Conversation

@enthusiastmartin

Copy link
Copy Markdown
Member

Removes the paths that let non-whitelisted assets pay fees, and the insufficient-asset ED toll.

Changes

  • Fee currencies limited to AcceptedCurrencies ‚ the XYK (X, DOT) tier is gone. set_currency, get_currency_price, account_currency, EVM permit gas and NativePriceOracle all apply the same whitelist check. XCM execution fees (Trader, XcmPaymentApi) are now limited to accepted currencies too.
  • Insufficient-asset ED removed ‚ no charge or refund. AssetRegistry::register_external (call index 4) is deleted; external assets are onboarded through governance register only. SufficiencyCheck ‚ BannedAssetCheck; ban_asset is now the spam control. Legacy sufficients refs are kept on purpose (not released).
  • DCA ‚when asset_in isn't an accepted currency, the fee is taken from the owner's free balance in their fee currency instead of swapping asset_in to DOT.
  • Withdraw circuit breaker ‚ assets outside the whitelist are valued with the 10-minute EMA over their on-chain route instead of the XYK/DOT spot price. Fail-closed: an asset with no route cannot be withdrawn.

Migrations

  • PurgeUnsupportedFeeCurrencies (multi-block) ‚ removes AccountCurrencyMap entries for non-accepted assets.
  • RetireInsufficientEdPool (single-block) ‚ removes the treasury SUFFICIENCY_LOCK and ExistentialDepositCounter. Note that treasury keeps it, not refunds. currently around 100k

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.

Tip: disable this comment in your organization's Code Review settings.

@enthusiastmartin
enthusiastmartin requested review from cl0w5 and mrq1911 and removed request for mrq1911 October 10, 2026 08:34
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Weight Diff Report

⚠️ 2 pallet(s) have changes exceeding ±10% threshold

25 extrinsic(s) changed across 4 pallet(s). New: 0. Removed: 3.

pallet_dca

Extrinsic RefTime Proof Size Reads Writes
on_initialize_with_buy_trade +0.5% (263.5M → 264.8M) — — —
on_initialize_with_sell_trade +1.0% (267.1M → 269.7M) — — —
on_initialize_with_empty_block +3.5% (20.4M → 21.1M) — — —
schedule ⚠️ -24.7% (235.3M → 177.2M) — 25 → 18 (-7) —
terminate +1.2% (99.9M → 101.1M) — — —
unlock_reserves +1.6% (60.9M → 61.9M) — — —
set_migration_enabled +3.0% (21.5M → 22.2M) — — —

pallet_transaction_multi_payment

Extrinsic RefTime Proof Size Reads Writes
add_currency +1.2% (27.2M → 27.5M) — — —
remove_currency +1.5% (26.6M → 27.0M) — — —
set_currency ⚠️ -12.9% (38.0M → 33.1M) — — —
get_oracle_price +2.8% (162.4M → 167.1M) — — —
reset_payment_currency -1.0% (22.2M → 22.0M) — — —
withdraw_fee ⚠️ -70.2% (321.0M → 95.7M) ⚠️ -67.7% (11322 → 3659) 30 → 8 (-22) 6 → 2 (-4)

pallet_asset_registry

Extrinsic RefTime Proof Size Reads Writes
register +2.1% (45.9M → 46.9M) — — —
update +1.7% (47.0M → 47.8M) — — —
ban_asset +2.8% (23.1M → 23.7M) — — —
unban_asset +2.1% (17.6M → 18.0M) — — —

pallet_route_executor

Extrinsic RefTime Proof Size Reads Writes
calculate_and_execute_sell_in_lbp -6.1% (500.1M → 469.8M) — 29 → 27 (-2) —
calculate_and_execute_buy_in_lbp +0.2% (123.2M → 123.4M) — — —
set_route_for_xyk -0.6% (623.1M → 619.2M) — — —
force_insert_route +2.5% (31.8M → 32.5M) — — —
get_route +8.6% (9.1M → 9.9M) — — —
get_oracle_price_for_xyk +1.7% (33.6M → 34.2M) — — —
get_oracle_price_for_omnipool +1.7% (62.1M → 63.1M) — — —
calculate_spot_price_with_fee_in_lbp +0.0% (55.2M → 55.2M) — — —
Removed extrinsics (3)
Pallet Extrinsic RefTime Proof Reads Writes
pallet_asset_registry register_external 32.3M 4087 2 6
pallet_dca on_initialize_with_buy_trade_with_insufficient_fee_asset 472.5M 31230 47 12
pallet_dca on_initialize_with_sell_trade_with_insufficient_fee_asset 472.0M 31230 47 12

Threshold: ±10%. Base Weight::from_parts(ref_time, proof_size) compared; per-unit components ignored.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Crate versions that have been updated:

  • runtime-integration-tests: v1.123.0 -> v1.124.0
  • pallet-asset-registry: v3.5.0 -> v4.0.0
  • pallet-dca: v1.21.1 -> v2.0.0
  • pallet-evm-accounts: v1.7.0 -> v1.7.1
  • pallet-liquidation: v2.6.0 -> v2.6.1
  • pallet-otc: v2.5.0 -> v2.5.1
  • pallet-otc-settlements: v1.4.2 -> v1.4.3
  • pallet-transaction-multi-payment: v10.8.0 -> v11.0.0
  • pallet-xyk: v8.2.0 -> v8.2.1
  • hydradx-adapters: v1.15.0 -> v2.0.0
  • hydradx-runtime: v451.0.0 -> v452.0.0
  • hydradx-traits: v4.14.0 -> v5.0.0

Runtime version has been increased.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.

Tip: disable this comment in your organization's Code Review settings.

@cl0w5 cl0w5 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@enthusiastmartin
enthusiastmartin merged commit 6a12389 into master Oct 15, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants