Implementation Details
Runtime Composition
pallet-balances
- Existential Deposit set to zero
- The
insecure_zero_ed
feature is enabled
pallet-pot-claim
- Implements a pot-based distribution mechanism for funds
- Extends the functionalities of
pallet_assets
andpallet_verify_merkle
- Utilizes
pallet_verify
validations to prevent double claims
pallet-verify-merkle
- Stores Merkle roots associated with item IDs, typically AssetId
- Provides a mechanism to validate proofs against selected Merkle roots by item ID
- Implements the
proving_trie
module based onsp_trie
for merkle proof validation - Assumes a dataset of account -> value, with both components extracted from proofs
- Tracks extracted accounts to prevent duplicate validations
pallet-free-txn
- Leverages the
feeless_if
pre-dispatch hook frompallet_skip_feeless_payment
to enable fee-free transactions - Implements a custom pre-dispatch that allows zero-balance accounts to call extrinsics
- Introduces a cooldown period for each origin to prevent rapid, repeated free transactions
- Applies a whitelisting filter to restrict fee-free calls to specific allowed extrinsics
Merklize Tool
The off-chain Merklize service provides essential functionality for the disposable chain stack:
- Root Generation: Provides an off-chain tool to generate merkle roots for given datasets
- Account Verification: Offers an endpoint to verify if a specific account holds a value (typically a balance) within the dataset
- Proof Calculation: Exposes an endpoint to calculate merkle proofs for valid accounts, enabling later verification against the root
Transaction Fee Checks
Following steps are performed in the Efímero: Disposable Chains transaction flow to determine if the user pays the fee or not:
- Free Transaction Criteria: Checks whether it is a feeless or free extrinsic
- Whitelist Verification: Checks if the inner call is whitelisted
- Cooldown Check: Checks if the cooldown period is over
- Execution: If all criteria are met, the user pays no fees
This flow ensures that new users can interact with the system without initial funding while preventing abuse through cooldown mechanisms and whitelisting restrictions.
In future, the transaction fee checks could be further extended by using a more robust sybil resistant mechanism using Proof of Personhood or an offchain verification system.