Smart Contracts

There are currently four smart contracts that make the operation of the Andromeda swap possible. The perks of the smart contracts on Andromeda are the code hashes used to instantiate them seamlessly.
AndromedaSwap implements a great number of efficient programming methods and paradigms that make the development and functioning of its protocol at the technical level top-notch, secure and reliable.
This section will briefly explain how each and every one of them works.


The router smart contract is the middleman (or intermediary) smart contract that handles the creation of the various pool pairs as well as records the data associated with them. It also provides a gateway to the pools to enable quick routing and association of the tokens related to them. The features it provides are:
  • PSP22 Trading pair creation.
  • AZERO Trading pair creation.
  • Getting associated liquidity pool address based on given tokens.
  • Getting token addresses.
  • Getting pool addresses.

AZERO Trading Pair

The AZERO pair contract is deployed by the router via its code hash and that enables the provision or liquidity and trading of a PSP22 token and AZERO. It functions by minting value to accounts in amounts equivalent to their shares of the pool when they supply liquidity, as well as burning them when they remove (withdraw) liquidity.

PSP22 Trading Pair

Likewise the AZERO trading pair, the PSP22 trading pair contract is deployed by the router contract, but what differentiates it is the fact that both tokens supplied in the pool are PSP22 tokens (no pooled AZERO), and is suited for PSP22-PSP22 direct trades.

Token Lock/Burn

The Token Lock/Burn features are made accessible by a single smart contract.
The smart contracts that run the AndromedaSwap protocol are totally permissionless and are neither mutable nor upgradeable.