Skip to content

Conversation

@sigurpol
Copy link
Contributor

@sigurpol sigurpol commented Dec 10, 2025

📝 Summary

This PR introduces pallet-dap-satellite, allowing system chains different from AssetHub to collect funds (to be periodically sent to DAP on AssetHub in future PRs) instead of burning them directly.

It also make any burns (initiated by the user via extrinsic or by a pallet) configurable (direct burn vs redirect to a buffer).

NOTE: until #10576 is merged, I am just building on top of that PR, for the reviewers: just look at delta between 10576 and this PR.

✨ Changes

  • pallet-dap-satellite: New pallet that implements FundingSink by accumulating funds in a satellite account.

  • [breaking change] pallet-balances: BurnDestination is now a required config item that must implement BurnHandler. The BurnHandler::on_burned method is called after decrease_balance removes funds from an account, allowing each runtime to choose whether burns lead to direct burning (reducing total issuance) or redirecting to a buffer.
    Runtimes must explicitly configure this:

    • Non-DAP runtimes should use frame_support::traits::tokens::DirectBurn<Balances, AccountId>
    • DAP-integrated runtimes use pallet_dap::ReturnToDap<Runtime> (on AssetHub) or pallet_dap_satellite::AccumulateInSatellite<Runtime> (on other system chains)
      Note that non-native asset burns via pallet-assets do not use pallet-balances's implementation of BurnHandler but they rely on the default one: each asset in pallet-assets has its own supply that should decrease when burned.
  • frame-support: New BurnHandler trait that FundingSink now extends. DirectBurn implements BurnHandler::on_burned to reduce total issuance.

🚀 Runtime integrations:

  • DAP satellite integrated in the following runtimes: westend (relay chain), bridge-hub-westend, collectives-westend, coretime-westend, people-westend
  • Burns for native tokens redirected to DAP for asset-hub-westend
  • Burns for native tokens redirected to DAP satellite for: westend (relay chain), bridge-hub-westend, collectives-westend, coretime-westend, people-westend
  • Remaining runtimes (rococo ecosystem, test runtimes) use DirectBurn which burns native tokens directly

🚧 TODO

  • more tests e.g. around integration between pallet-balances and DAP and BurnHandler in dap / dap-satellite

🔜 Coming next

In future PRs, we will hook the logic to periodically send funds from the satellite to the main DAP on AssetHub.

Related PRs / issues

Followup of #10576.
Close #10488.

Introduce an initial version of the Dynamic Allocation Pool (DAP).
It makes possible  to collect funds that would otherwise be burned, into
the DAP buffer on AssetHub.

On Westend AssetHub:
- Treasury unspent and staking slashes are now redirected to the DAP buffer
instead of being burned.
- All user-initiated burns also go to the DAP buffer instead of reducing
total issuance.

Events:
- FundsReturned is emitted only for explicit user actions (e.g., burn extrinsic
via FundingSink).
Automatic system operations like fee handling and slashes via OnUnbalanced do
NOT emit events to avoid bloating blocks with tons of events per block.
This is done in order to reduce the scope of the initial changes. We
comment out the BurnDestination from pallet-balances config so that we
avoid to introduce a breaking change for all runtimes.
This is initially acceptable since burn extrinsic is rarely used.
@sigurpol sigurpol requested review from a team as code owners December 10, 2025 10:57
@sigurpol sigurpol added T2-pallets This PR/Issue is related to a particular pallet. A4-backport-stable2512 Pull request must be backported to the stable2512 release branch labels Dec 10, 2025
@sigurpol sigurpol changed the title Introduce pallet-dap-satellite for fund collection on relay-chain and system chains 🚧 Introduce pallet-dap-satellite for fund collection on relay-chain and system chains Dec 10, 2025
@sigurpol sigurpol changed the title 🚧 Introduce pallet-dap-satellite for fund collection on relay-chain and system chains 🚧 Introduce pallet-dap-satellite and redirect all burns for native tokens to DAP/ DAP satellite on Westend runtimes Dec 10, 2025
@sigurpol sigurpol force-pushed the sigurpol-dap-satellite branch from 4ecbd80 to 5025686 Compare December 10, 2025 22:19
@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/20169056538
Failed job name: test-linux-stable

…havior

- Add BurnHandler trait called after decrease_balance in burn_from
- FundingSink now extends BurnHandler
- DirectBurn::on_burned reduces total issuance (traditional burning)
- DAP handlers use increase_balance to credit buffer (tokens preserved)
- Override burn_from in pallet-balances to call
T::BurnDestination::on_burned
@sigurpol sigurpol force-pushed the sigurpol-dap-satellite branch from 137b6f5 to ee054ae Compare December 15, 2025 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A4-backport-stable2512 Pull request must be backported to the stable2512 release branch T2-pallets This PR/Issue is related to a particular pallet.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pallet-dap-satellites: local collection to avoid burn

2 participants