pallet-asset-conversion

Crates.iopallet-asset-conversion
lib.rspallet-asset-conversion
version20.0.0
sourcesrc
created_at2023-03-31 09:01:01.426065
updated_at2024-09-26 06:22:27.194195
descriptionFRAME asset conversion pallet
homepagehttps://paritytech.github.io/polkadot-sdk/
repositoryhttps://github.com/paritytech/polkadot-sdk.git
max_upload_size
id826165
size172,858
Parity Crate Owner (parity-crate-owner)

documentation

README

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 stable2409

Commit count: 17920

cargo fmt