Skip to main content

Crate pallet_dap

Crate pallet_dap 

Source
Expand description

§Dynamic Allocation Pool (DAP) Pallet

Intercepts native token burns (staking slashes, transaction fees, dust removal, reward remainders, EVM gas rounding) on AssetHub and redirects them into a buffer account instead of destroying them. The buffer account must be pre-funded with at least ED (existential deposit), e.g., via balances genesis config or a transfer. If the buffer account is not pre-funded, deposits below ED will be silently burned.

Incoming funds are deactivated to exclude them from governance voting. When DAP distributes funds (e.g., to validators, nominators, treasury, collators), those funds must be reactivated before transfer.

  • Burns: Use Dap as OnUnbalanced handler for any burn source (e.g., type Slash = Dap, type DustRemoval = Dap, type OnBurn = Dap) Note: Direct calls to pallet_balances::Pallet::burn() extrinsic are not redirected to the buffer — they still reduce total issuance directly.

Re-exports§

pub use pallet::*;

Modules§

pallet
The pallet module in each FRAME pallet hosts the most important items needed to construct this pallet.

Type Aliases§

BalanceOf
Type alias for balance.
CreditOf
Type alias for credit (negative imbalance - funds that were slashed/removed). This is for the fungible::Balanced trait as used by staking-async.