You are viewing an archive of the Piccadilly Circus Games Competition. Join our Discord for the latest information.

Use AirSwap RFQ

Recipes for how to p2p trade and be a maker, taker, or both on an AirSwap-based RFQ and OTC DEX. Trade ERC-20 token markets in LNTN, NTN, wrapped ATN, and mock USDC on Autonity Piccadilly Testnet!

Synopsis

This page details:

  • resources for how to get set up and interact with AirSwap
  • the ERC-20 token markets you can trade using AirSwap RFQ or OTC: LNTN, NTN, wrapped ATN, mock USDC
  • how to set yourself up to trade as a taker using RFQ
  • how to set yourself up as a maker using OTC

You can run a maker server and create orders OTC to be a maker, take orders RFQ to be a taker, or be both.

Trading is simple with a frontend UI provided. The UI requires you connect a wallet, so you will need to have your wallet software setup to use the address you registered for the game.

AirSwap markets to trade

AirSwap is set up for you to trade ERC-20 token markets in LNTN, NTN, wrapped ATN, and mock USDC:

  • NTN/USDC
  • LNTN/USDC
  • ATN/USDC
  • NTN/ATN
  • LNTN/ATN
  • LNTN/LNTN

Set up your wallet

To setup your chosen wallet you will need to:

Your token holdings on Piccadilly will now be available to AirSwap once you connect your wallet.

How to set yourself up to trade as a taker

Orders can be made from the command-line or from the frontend UI.

To take orders from the frontend UI:

  • setup your wallet
  • navigate to the DEX Frontend UI URL https://airswap-web-piccadilly.pages.dev/#/ and connect your wallet
  • request a quote. By default the RFQ screen is presented. Select the from-to token pair and the amount to trade.
  • submit the RFQ. Click CONTINUE to submit a request a quote for the order.
  • take the order. If a trade is available, it is presented and you will be able to take the order.

Note that there will be 2 transactions for the trade: 1 to approve a spending cap on the AirSwap swap contract, 1 to execute the swap transaction on Piccadilly.

Use the Autonity Discord AirSwap channel to find fellow p2p traders!

To discover counterparties for p2p trading use the Autonity Discord Server dedicated channel PICCADILLY CIRCUS GAMES / AirSwap!

Interacting with AirSwap from the command-line

If you want to interact with the AirSwap maker server from the command line, then you will need to customise your CLI for the Piccadilly deployment. Run this command to install an AirSwap CLI custom build configured with contract addresses for the Piccadilly AirSwap deployment:

npm install -g https://github.com/clearmatics/airswap-cli/releases/download/pcgc-r6.2/airswap-4.3.1-autonity.4.tgz

For how to use AirSwap CLI see the source repo https://github.com/airswap/airswap-cli README file.

How to set yourself up as a maker

Make new orders

Orders can be made from the command-line or from the frontend UI.

To make orders from the frontend UI:

  • setup your wallet
  • navigate to the DEX Frontend UI URL https://airswap-web-piccadilly.pages.dev/#/ and connect your wallet
  • make an order. By default the RFQ screen is presented. Select OTC and switch to the new order screen. Your current order list and status is displayed
  • click NEW ORDER. The Make screen is presented. Make the order:
    • Select the from-to token pair and the amounts you are offering to trade.
    • Specify who the order is for: anyone or a specific taker address
  • click REVIEW to check (and edit) your order
  • click SIGN to submit the quote and trade.
  • approve the signature request presented by your wallet to create the order.

The new order screen will present your order and the time until expiry - which is 1 hour.

The order can be cancelled by clicking CANCEL ORDER.

To share the order URI, click COPY LINK to copy a resolvable link to your clipboard.

Use the Autonity Discord AirSwap channel to find fellow p2p traders!

To discover counterparties for p2p trading use the Autonity Discord Server dedicated channel PICCADILLY CIRCUS GAMES / AirSwap!

Interacting with AirSwap from the command-line

If you want to interact with the AirSwap maker server from the command line, then you will need to customise your CLI for the Piccadilly deployment. Run this command to install an AirSwap CLI custom build configured with contract addresses for the Piccadilly AirSwap deployment:

npm install -g https://github.com/clearmatics/airswap-cli/releases/download/pcgc-r6.2/airswap-4.3.1-autonity.4.tgz

For how to use AirSwap CLI see the source repo https://github.com/airswap/airswap-cli README file.

Setup an AirSwap maker server

To do this you will need to install and configure an instance of the AirSwap reference server running the RFQ and LastLook protocols. To get going, see the AirSwap docs and repos: