fix: take the wormhole volume fee from the shipped runtime metadata - #610
Open
n13 wants to merge 1 commit into
Open
fix: take the wormhole volume fee from the shipped runtime metadata#610n13 wants to merge 1 commit into
n13 wants to merge 1 commit into
Conversation
The 4 bps fee was a Dart constant kept in sync with `Wormhole::VolumeFeeRateBps` by hand — the mismatch that broke proofs in #606. It now comes from the metadata the app already ships with, i.e. the generated pallet constants; a runtime that changes the fee needs regenerated bindings, not an edited literal. The bindings were regenerated against planck for that (they still carried the old 10 bps). That also drops the `Assets` pallet and reversible `schedule_asset_transfer`, both removed from the runtime (pallet index 17 is vacant), so their decoder branches, tests and cold-wallet debug payloads go with them.
n13
force-pushed
the
fix/wormhole-fee-from-metadata
branch
from
August 15, 2026 04:03
c027fb1 to
faec6c1
Compare
illuzen
approved these changes
Aug 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #606 (comment) — the volume fee is no longer a hand-maintained copy of a runtime value.
It comes from the metadata the app already ships with (the generated pallet constants). A runtime that changes the fee needs regenerated bindings and a new build — never an edited literal. Everything downstream (coin selection,
wormholeNetScaled, the proof'svolume_fee_bps, the fee labels) is unchanged and keeps reading that one value.Regenerated bindings
The committed bindings still said
volumeFeeRateBps = 10, so they were regenerated against planck (melos run generate+melos run format). Beyond the fee, this brings in the runtime drift that had accumulated:AssetsandAssetsHolderare gone — the runtime removed them (// Index 17 was pallet_assets (removed). Kept vacant so downstream pallet indices stay stable.), which also removes reversibleschedule_asset_transfer/schedule_asset_transfer_with_delayGenesisEndowmentsPending,PotentialWormholeBalance,TotalWormholeExitsstorage dropped, new events/errors, updated docsDilithiumSignatureSchemevariants updatedBecause those calls can no longer exist on chain, the code that decoded them goes too: the call decoder's
Assetsbranch and the two reversible asset-transfer cases, their tests, and the cold-walletAsset/Reversible assetdebug payloads and display test.Note:
AmountField.assetId/TransferSummary.assetId(and the "ASSET SEND" title branch) stay in the display model — nothing can populate them now, so they're inert. Removing them touches both apps' call-detail UIs; happy to do it in a follow-up.Verification
melos run analyze— clean across all four packagesmelos run format— no changes after regenerationflutter test: 168 pass; the 5 failures are the pre-existingsetUpAllones that need the compiled Rust dylib (identical on an untouchedmaincheckout)test/widget_test.dart)wormhole_coin_selection_testasserts the fee is 4 and0.04%, now sourced from the regenerated metadata