Getting Started with AllianceBlock DEX + Bug Bounty Program

Share:
Indexes
  1. Why did we release the DEX on Testnet?
  2. How to properly test the DEX
  3. Create a liquidity pool
  4. Add liquidity to an existing pool
  5. Removing Liquidity
  6. Making a trade

AllianceBlock DEX Testnet is live on Polygon’s Mumbai and Energy Web’s Volta. In this crucial period of the release of our brand new automated model maker, it’s important to involve our NoMercy community in the testing of the DEX and let you earn some rewards along the way. In this blog post, you’re going to find out about how you can test the DEX and how you can participate in our bug bounty program.

Before we begin, you can find out more about our innovative mathematical model here and access the DEX here!

Why did we release the DEX on Testnet?

We couldn't wait to share the first phase of the DEX with our eager community. However, we need you to help get the DEX to become the most secure platform out there. Try to hack it, slice it, slash it, break it, etc. in every way you can. Doing so will help us to improve our product and it will make you eligible for a reward in ALBT.

Testnet allows anyone to participate in testing the DEX without using tokens that represent a real-world value. Tokens on a testnet can be requested freely, quickly, and easily. Also, testnets are often faster, which makes it more comfortable to go through a platform thoroughly.

We have deployed on testnets of our partners: Polygon (Mumbai) and Energy Web (Volta). More information on how to participate using those networks is outlined in the "How to get started" segment below.

About the Bug Bounty Program

The bug bounty program, previously done also for the Bridge and for LMaaS v2.0, rewards users that help find bugs and report them back, usually in a way that describes steps to reproduce the issue at hand.

The AllianceBlock Bug Bounty Program is split into different phases:

  • Phase 1: Low Hanging Fruit
    In this phase, bugs reported are usually low-hanging fruit and are likely style problems, minor bugs, and feature suggestions. This phase is really important, as the reported issues are very important to get the foundation for the look and feel and the logic behind the product right. Users still need time to get used to the product before they can do more extreme tests in order to explore the limits.
  • Phase 2: More Serious Issues
    In this phase, users have gotten acquainted with most of the features of the products offered. They start to explore new areas and try to find ways to push the limits of what the products can do. Sometimes, experts take time to set up tests and processes that will aim to attack potential weaknesses of the product that will be ready to be unleashed in phase 2. More serious issues are usually found in this phase.

For both phases, a total allocation of 300,000 ALBT is reserved as a reward for testers.

Issues, when reproduced, will be divided into the following categories:

  • Informational
    These issues are more suggestions for improvement than actual bugs
    1–200 ALBT reward
  • Minor
    These issues impact usability of the DEX
    200–1,000 ALBT reward
  • Medium
    These issues have a serious impact on the DEX
    1,000–4,000 ALBT reward
  • Major
    These issues have a major impact on the DEX or user's funds
    5,000–10,000 ALBT reward

How to become eligible for a bug bounty

Anyone can participate! You don't have to be a computer scientist or a hacker (although these are really welcome too!). It's simple really: use the DEX, in any way, try to break it, try to do things no one would think of, and if it goes wrong follow these steps:

  • Visit the public bug bounty list
  • Check if the bug was not yet already reported (if already reported, there is no point in reporting it again)
  • Make sure to document the steps that lead to the issue, so that it can be reproduced easily
  • Add information about the environment it was tested in (mobile, desktop, what type of computer, internet speed situation, what internet browser, etc.)
  • Make screenshots or a video where it adds value
  • Add as much information in general (which network you tested on, a transaction ID, etc.) that makes sense. Use common sense, don't overshare (personal information for example). Be always mindful of what you include in your screenshots!
  • Include all of this information in an email that you send to [email protected]

Eventually, your finding will be added to the public bug bounty list and you can track the status of the bug as well. If you have reported the bug as first person, or as a shared person (when the bug wasn't added to the list yet) you are already automatically eligible for the bounty reward! You will automatically receive an email at the end of the program with more information about how to obtain the bounty reward.

How to get started

  • The DEX can be found on the following link: https://alliance-dex-test.web.app/
  • The DEX runs on both Energy Web's Volta testnet and Polygon's Mumbai testnet
  • For both Energy Web Volta and Polygon Mumbai, you need native tokens in order to pay for transition fees. These tokens can be obtained for free(!) on the following "faucets":
    https://faucet.polygon.technology/
    https://voltafaucet.energyweb.org/
  • Both networks are EVM compatible, meaning you can use MetaMask to connect to the DEX. Don't have these networks in MetaMask yet? Simply add them by a simple click using https://chainlist.org/
  • In order to properly test the DEX (providing liquidity & trading), you'll need to have some test tokens. Fortunately, we've got you covered in this area too! We have created the AllianceDEX Faucet that hands out tokens to anyone that will paste their wallet address. You can select on which network you want to receive the tokens and what type of token you want. There is a range of different tokens available and each provides a different amount of that token (with a limit per wallet).

How to properly test the DEX

When you are prepared and ready to go, here are some tips to properly test the DEX:

  • Don't overcomplicate it, sometimes it's enough to just go through the simple steps that work for everyone else, but don't for you just because you are working on a device that offers an edge that is new to us
  • Anything is allowed. If you break the DEX, we will not scold you, we will reward you!
  • Yes, the frontend is easy to test, but please, try to get dirty with the smart contracts too. We really want you to (if you can)
  • Repeat things. Did it work this time? What if you tried it another 10 times? It should work. But who knows, maybe it doesn't?
  • Observe. Don't quickly go through all the steps. Look at the things that are not necessarily in focus. Do they still make sense? Are there any things that you have seen that shouldn't be there?
  • Try to click on things that shouldn't be clicked. Don't be afraid to break it. If a button shouldn't be clicked, we shouldn’t have made it clickable.
  • Create your own token or other contracts (if you can) and try to break the DEX with it
  • If you can hack it using the console in order to do things that you shouldn't be doing, let us know so you can be rewarded for that too!
  • If you’d rather experiment with the DEX without the frontend and find that something can be directly done with the smart contract that shouldn't be allowed, perfect too!

Mainly, have fun, be creative, don't be scared, and don't forget to report…

Tips on how to use the DEX (small tutorial)

If you need some pointers on how to use the DEX, please take the following into account:

DEX stands for "Decentralized EXchange". It's where people can trade (swap) tokens for other tokens using smart contracts instead of a centralized exchange that is basically a black box. Nowadays, DEXs use Automated Market Makers with Liquidity Pools. A liquidity pool is basically a contract that holds two assets in a 50/50 ratio. Meaning, that if one asset gets bought from that pool, the other asset needs to go in, resulting in that the price of the asset bought going up (as it's a bit scarcer in the pool now) and the price of the asset that went into the pool goes down (as there is more of it now).

Anyone can create a liquidity pool or add liquidity to an existing pool and earn trading fees from trades that are being made in that pool.

This model typically comes with impermanent loss. Simply put, a theoretical loss that you as a liquidity provider incur when the price of one asset moves a lot and you remove your liquidity. The AllianceBlock DEX has drastically reduced this impermanent loss compared to other DEXs out there.

So, when you want to use the AllianceBlock DEX, you can do the following 3 core features:

  • Create a liquidity pool (or add liquidity to an existing pool)
  • Remove liquidity (completely or partially)
  • Make a trade

Create a liquidity pool

Go to AllianceBlock DEX and click on "Pool" in the top menu:

Click on the "create a pair" button:

You are treated with the following modal:

Click on MATIC and select a token you want to use as the first token of your liquidity pool. Don't see your Token there? Use the search box on top in order to add your custom token address:

After you have selected the first token, click on "Select a token" below. Again, click the second token you want to add to the liquidity pool.

Then you can decide on the ratio between tokens. For example, if you want to create a liquidity pool between DAI and USDT, you'd want a ratio of 1:1, so you can put 1000 and 1000 at their inputs (or any other amount that is equal to each other). If you have another pair, you might want to have more of one token than the other depending on their value relative to each other.

If you've selected your tokens and you can't decide the ratio (meaning: it's automatically calculated for you already), that means that you are not the first liquidity provider. The result, if you continue, would be that you would be adding liquidity to that existing pool (always make sure the ratio is to your liking).

Once, done, you need to Approve both tokens and then click Supply to be able to send them to the pool.

In exchange, you will get LP-tokens (ABLP) in your wallet that represents your share of that pool and are used to get back your share of the pool again when you will remove your liquidity.

Add liquidity to an existing pool

In order to add liquidity to an existing you'll need to click the "Add liquidity" button in the Pool screen:

You can then then use the same logic from creating a new liquidity pool, to select the tokens of the liquidity pool you want to add liquidity to and enter an amount at one of the tokens. The ratio will automatically be calculated and the amount of the other token input will be adjusted accordingly. You finish by Approving the tokens (if it wasn't done before yet) and then clicking supply.

Removing Liquidity

If you want to stop providing liquidity, you can use the wallet that holds the ABLP tokens (probably the one you have used to provide liquidity with, unless you have sent the ABLP tokens to another wallet) in order to follow the following steps:

Go to the pool page and find the pool from which you want to remove liquidity. Click "Manage":

The information for that pool will extend and you can click the "Remove" button:

In the modal that pops up you can use the slider to select the percentage of the liquidity you want to remove. After that you can simply click "Approve" (for ABLP tokens) and then "Remove":

Making a trade

For some users, the most important feature of a DEX is the ability to trade an asset with another. This is done through the Swap page:

You will be greeted with the following dialog:

In here you can select a token you want to use to purchase an asset (now the one marked as MATIC) and another token that you want in return. You can set the amount of one of these assets in order to calculate the amount of the other asset automatically according to their ratio in the liquidity pool. If you can't find your token, you can easily enter the token address on top of the dialog that you see when you select a token.

A few things to take into account:

  • If a trade can't take place because the price impact is too high (low liquidity in the pool), you can click on the gear icon (top right of the dialog) and increase slippage tolerance or enable advanced mode
  • If there is no liquidity pool for the pair, the AllianceBlock DEX will search for another pair to hop to in order to be able to make the trade. For example: if there is a liquidity pool with WALBT/USDT, a liquidity pool with WBTC/USDT and you want to swap WBTC for WALBT (note: there is no WBTC/WALBT liquidity pool), it will swap the WBTC for USDT and then the USDT for WALBT automatically.

Don't be ashamed if you don't "get it" immediately. Don't hesitate to join our Telegram channel and ask your questions, there will always be someone available that is more than happy to help you out.

Happy testing!

About AllianceBlock

AllianceBlock is bridging the gap between decentralized finance and traditional finance, by remedying issues that exist in both spheres and linking them more closely together. They see the future of finance as an integrated system in which the best of both worlds can work together to increase capital flows and technological innovation.

Building this future by bridging traditional finance with compliant, data-driven access to new decentralized markets, DeFi projects, and ecosystem-scaling tools such as funding and interoperability. As such, they are building a next-generation financial infrastructure that aims to provide regulated financial entities around the world with the tools they need to seamlessly access the DeFi space.

You can also find us on:

Telegram · Twitter · Instagram · Website · LinkedIn · YouTube · Medium