25 releases (major breaking)
new 21.1.0 | Mar 27, 2025 |
---|---|
20.0.0 | Sep 26, 2024 |
19.0.0 | Jul 18, 2024 |
18.0.0 | Jul 12, 2024 |
0.0.0 | Mar 31, 2023 |
#396 in Magic Beans
19,985 downloads per month
Used in 94 crates
(10 directly)
3.5MB
56K
SLoC
asset-conversion
A swap pallet
This pallet allows assets to be converted from one type to another by means of a constant product formula. The pallet based is based on Uniswap V2 logic.
Overview
This pallet allows you to:
- create a liquidity pool for 2 assets
- provide the liquidity and receive back an LP token
- exchange the LP token back to assets
- swap 2 assets if there is a pool created
- query for an exchange price via a new runtime call endpoint
- query the size of a liquidity pool.
Please see the rust module documentation for full details:
cargo doc -p pallet-asset-conversion --open
License
License: Apache-2.0
Release
Polkadot SDK Stable 2412
Dependencies
~19–34MB
~574K SLoC