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.
Storage
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.
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 18 β precision constant as 1018 and 3 "abstract" tokens TBC, TXZ, TEH that have ratios 4:2:1 respectively.