Automated Market Maker (AMM) Decentralized Exchange (DEX)

AndromedaSwap offers a safe and secure means for the exchange of assets with a defined liquidity pool, valued with a ratio-based formula.

AndromedaSwap as a protocol makes use of PSP22 tokens and allows for trading between PSP22 tokens and PSP22 tokens or AZERO and PSP22 tokens as the case may be based on liquidity supplied by Liquidity providers. Trading is based on the ratio of the assets in any pool consisting of AZERO and PSP22 tokens or PSP22 tokens and PSP22 tokens.

When liquidity is supplied to any pool, several PSP22 tokens (called Liquidity pool tokens) associated with it are minted to the provider and that represents their share of the supply. Suppose Alice has two tokens, Token A and Token B respectively and she wants to add liquidity to a given pool (into which tokens weren’t initially deposited), and she adds 100 and 200 of Token A and Token B respectively, 100 LP tokens are minted to her to represent her share of the pool. The total supply in that case for the LP token becomes 100.

Now, say Bob wants to also supply liquidity for the same pool, he would have to deposit tokens A and B in the same ratio of 100:200 which could be 500:1000 or 1000:2000 as the case may be. If he deposits 200 of Token A and 400 of Token B respectively, he gets 200 LP tokens minted to him (the first token in the pair is used to peg minting volumes to the liquidity providers) which also represents his share of the pool. In that way, the total supply of the LP tokens becomes 300 and then his share is 200/300 multiplied by 100, which is 66.66…% of the pool and Alice's share becomes 100/300 multiplied by 100, which is 33.33…% of the pool. It’s as simple as that.

The protocol charges fees which are split and left in the pool for the Liquidity providers to earn as fees. That way, when they withdraw their tokens, which is done by sending in LP tokens. they can take off the extra fees based on their share of the pool as well as the amount of Token A and Token B worth that same value.

When traders swap tokens, they pay fees deducted from the tokens deposited and intended to be received from any associated pool.

It’s as simple as that.

Last updated