🏠Standalone DEX
Last updated
Last updated
This all-in-one contract, managed by admin
. Each deployed DEX is stored inside the current contract and has its own FA2 token. Access to a specific DEX, implemented by pool ID. This ID is an also LP token ID. Every token metadata is managed by any of the manager's addresses.
Contract storage has a complicated structure all info about storage is collected on the page below.
Main methods of DEX, that are able to use by anyone. These methods include investing, swapping, and divesting. Also, there are additional methods for staking QUIPU tokens for earning additional rewards and claiming referral rewards.
The developer section contains Developer module entrypoints and additional methods for claiming developer rewards.
These entrypoints should be called only by developer
address.
These entrypoints should be called only by admin
address.
The next section is about entrypoints for managing fees, "A" constant change, editing manager list, and changing an admin address.
These methods should be used before global usage of contract. Entrypoints set lambda-functions to its corresponding indexes inside related big maps.
Creating a new DEX pool in the standalone variant is an admin function. So only the admin can create a new pool. Admin should approve the needed amount of tokens before calling this method because call includes transfer selected tokens to contract.
All examples use LP token with decimals
of ↔ precision
constant as and 3 "abstract" tokens TBC
, TXZ
, TEH
that have ratios respectively.