WIP: Basic dex pallet
A simple automated market maker pallet.
I'd direct both non-technical discussion and discussion of possible future improvements to be hosted on the forum: https://forum.polkadot.network/t/statemint-e-swap-discussion/1498
The goal of this pallet is to provide people with a simple audited AMM pallet should a substrate chain need a basic decentralised exchange. (note: audit is still to be done.)
(Additional functional changes to this main PR should be done as child PRs that merge into this one.)
There is no good reason to support Currency & Assets, which reduces compatibility and add complexity. If you really want to implement DEX, I will suggest take a look to some of the existing implementations first.
It's no secret that the dex pallet might well be used in the statemint runtime. That runtime currently uses the Balances and Assets pallets. All the bounds are against traits so it shouldn't preclude the dex being backed by other asset registry pallets that support the fungibles traits.
You need to check how orml-tokens, orml-currencies works. I did a workshop about it https://github.com/xlc/orml-workshop Basically the DEX pallet shouldn't need to handle two currency implementation. It is an adapter's job to handle that.
@xlc I hear you. I'm hoping that XCM v3 which is "coming soon™" gets merged. When that happens I'd like to re-work the interface so that MultiAssetId is replaced with XCM v3's MultiLocation as that can represent everything in a standard way.
@xlc I hear you. I'm hoping that XCM v3 which is "coming soon™" gets merged. When that happens I'd like to re-work the interface so that MultiAssetId is replaced with XCM v3's MultiLocation as that can represent everything in a standard way.
So we can expect that everything works with orml_tokens and orml_currencies in the first iteration of this pallet? This would be super useful, especially because many projects depend on the orml library. pallet_asset support is fine, but the real fruition kicks in with MultiAsset pallets like from the orml library. pallet_assets differs from orml_tokens in key points as we know. I don't think that pallet_assets is meant to replace orml_tokens, right?
bot rebase
bot rebase
bot clean
bot bench $ pallet dev pallet_asset_conversion
@jsidorenko https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2615782 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_asset_conversion. Check out https://gitlab.parity.io/parity/mirrors/substrate/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.
Comment bot cancel 18-3edf597f-0663-438a-8e5c-df37da43fbef to cancel this command or bot cancel to cancel all commands in this pull request.
@jsidorenko Command "$PIPELINE_SCRIPTS_DIR/commands/bench/bench.sh" pallet dev pallet_asset_conversion has finished. Result: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2615782 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2615782/artifacts/download.
bot rebase
Rebased
bot rebase
Rebased
Last audit issue fixed. Removing needs audit label.
let's allow auditors to set the "audited" label :)
The CI pipeline was cancelled due to failure one of the required jobs. Job name: check-dependent-cumulus Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2897564
bot merge