-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[PoC] First iteraration of the Dynamic Allocation Pool (DAP): burns -> DAP buffer #10481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
/cmd prdoc --audience runtime_dev --bump major |
c7f8735 to
fc8f9d6
Compare
- FundingSource: trait for requesting funds from an issuance system
- this could mean minting new tokens or transferring from a given
issuance buffer's account
- FundingSink: trait for returning funds to an issuance system
- this could mean burning tokens or transferring to a given
issuance buffer's account
Minimal initial implementation of pallet-dap. Only FundingSink is functional and allows replacing burns in other pallets with returns to DAP buffer.
…time_dev --bump major'
…etime-westend runtime
Integrate westend-runtime with pallet-dap-satellite. Preserve the pre-existing logic for which: - 100% of tx fees -> block author - 100% of tips -> block author This is an overkill for Westend but is just an exercise in preparation of what we will do for Polkadot and Kusama (e.g. X% / 100 -X% split)
9e7dd3f to
d7f413a
Compare
We preserve the original behavior in Westend i.e. 100% fees to staking pot. But while doing so, we make it configurable.
…tween satellite and another destination
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great. My only real question or concern is: should we do a very minimal PR just to stop treasury burn (plus maybe staking slash but thats also rare), and later a bigger change with satellite pallets and potentially moving the minting logic as well inside this pallet? Note that, this will make the audit easier too.
That's a very good point. This PR initially was meant to be really a PoC / exploration to try to sketch
But once I started hooking the dap satellite part, the PR already became pretty big one (and the XCM part is still missing from DAP satellite) - even if changes outside dap / dap_satellite are very minimal. So I decided to postpone the minting logic for later to avoid to bloat it even more. I believe your approach to have just DAP in a small PR makes sense since it covers the big source of burning (treasury). But considering it 's not a big amount, I think it's something we can still discuss later and go for a more pragmatic approach:
|
|
I'll keep this PR around as reference for
but do not spend time in reviewing it furher. First chunk of changes we plan to have on-chain here -> #10576 |
[DISCLAIMER] This PR is intended as a proof of concept and will not be merged in its current state. Look at #10576 for the first chunk of deliverables we plan to integrate on chain.
📝 Summary
This initial PoC of the Dynamic Allocation Pool (DAP) makes it possible to collect funds that would otherwise be burned, into
This is fully configurable, meaning that chains can choose to redirect all, some, or none of the funds that would be burned into DAP.
NOTE: the mechanism to periodically transfer funds from the DAP satellite to the DAP buffer via XCM is not yet in place.
🚀 Events
FundsReturned(pallet-dap) andFundsAccumulated(pallet-dap-satellite) are emitted only for explicit user actions (e.g.,burnextrinsic viaFundingSink).Automatic system operations like fee handling and slashes via
OnUnbalanceddo NOT emit events to avoid bloating blocks with tons of events per block.⛓️💥 Westend
RelayChain and system chains are now integrated with DAP / DAP satellite.
Breaking change: all runtimes must now explicitly configure
BurnDestination:pallet_balances::DirectBurn<Runtime>for direct burning.pallet_dap::ReturnToDap<Runtime>(on AssetHub) orpallet_dap_satellite::AccumulateInSatellite<Runtime>(on other system chains).🏗️ TODO in the scope of this PR
new benchmarking for dap/dap-satellite: not needed, bothpallet-dapandpallet-dap-satellitehave no extrinsics. They only provide trait implementations (FundingSink,OnUnbalanced) that other pallets call for which we have ad-hoc benchmarks.🔜 Coming next (in follow-up PRs)
In the next iterations, we will introduce the following: