How to get ANJ and become an Aragon Court juror

ANJ (Aragon Network Juror) is the native token of Aragon Court, which jurors need to activate in the Court to be selected and earn dispute fees. The use of ANJ helps align the incentives of jurors with the long-term health of the Court, ensuring the Court's integrity. The following tutorial will guide you through the steps necessary to get ANJ in order to become an Aragon Court juror.

1. Check the ANJ conversion rate

Currently, jurors must hold and activate at least 10,000 ANJ to be eligible for drafting and earning subscription fees. Visit anj.aragon.org to check the current ANJ conversion rate for the token you want to use to purchase ANJ. The conversion module on anj.aragon.org currently supports buying ANJ using ANT, DAI, ETH, and USDC.

2. Get one of the supported tokens to buy ANJ

You can purchase one of tokens supported by the ANJ conversion module (ANT, DAI, ETH, or USDC) on various exchanges such as Uniswap, DEX.AG, or other token exchanges. If you already have enough of one of these tokens and you want to use the tokens to buy ANJ, you can skip this step.

2. Convert your tokens into ANJ

To convert your tokens to ANJ, either go to anj.aragon.org or click on the Buy ANJ button on the Aragon Court Dashboard.

Then use the conversion module to convert your tokens into the desired amount of ANJ.

The ANJ bonding curve

The ANJ token supply is regulated by a bonding curve, an automated market maker smart contract that defines a relationship between token price and token supply. In this case, the bonding curve is used to convert ANT into ANJ and back at pre-defined rates. The more ANT is sent to the bonding curve, the fewer new ANJ will be released back to the sender, and vice versa. You can find a technical explanation of bonding curves here and find the source code for the specific smart contract of the ANJ bonding curve here. Read on for instructions about how to interact directly with the bonding curve contract to convert ANT to ANJ and ANJ back to ANT.

Converting ANT to ANJ

Check bonding curve price

On this contract you can use calculatePurchaseReturn or calculateSaleReturn (depending on your direction) with the following parameters:

  • _supply: Here you need to provide the total supply of ANJ. You can get that total amount of ANJ tokens ever minted from its Etherscan contract, with getter totalSupply(#3), as seen in the image below:
  • connectorBalance: The balance of ANT in the bonding curve. You can get it from the Etherscan contract for ANT, balanceOf(#12), with the address 0xec0dd1579551964703246becfbf199c27cb84485 as a parameter.
  • depositAmount: the amount you want to convert. Remember to adjust for 18 decimal precision e.g. 100 ANT = 100000000000000000000.

Approve market maker contract to withdraw ANT

⚠ This is only needed if you are converting to ANJ.

You can do this on Etherscan ANT page using approve function (#2), and the address of the market maker contract,0x5D9DbF55aF65498FaA84BDD4dDe37f7F3f8c7af1, as _spender. _value should be the amount of ANT that you will use in the next step to convert to ANJ.

Open order

Go to Court Fundraising contract on Etherscan and use openBuyOrder (#22) to exchange ANT to ANJ.

  • Put a zero in first parameter, openBuyOrder ("payableAmount (ether)")!
  • The address of the collateral, ANT, is 0x960b236A07cf122663c4303350609A66A7B288C0.
  • Parameter _value is the amount of ANT you are contributing to the curve. Remember to adjust for 18 decimal precision e.g. 100 ANT = 100000000000000000000.
Make sure to click the button to view your transaction on Etherscan.

Claim order

Still on that Etherscan Fundraising contract page, once your previous transaction has been mined, you can finally get your ANJ tokens calling claimBuyOrder (#10), where _buyer is your address and _collateral is again ANT address 0x960b236A07cf122663c4303350609A66A7B288C0.

For the _batchId, use the block number of your previous transaction:

Converting ANJ to ANT

Check Bonding Curve price

On this contract you can use calculateSaleReturn with the following parameters:

  • _supply: Here you need to provide the total supply of ANJ. You can get that total amount of ANJ tokens ever minted from its Etherscan contract, with getter totalSupply(#3), as seen in the image below:
  • connectorBalance: The balance of ANT of the bonding curve. You can get it from the Etherscan contract for ANT, balanceOf(#12), with the address 0xec0dd1579551964703246becfbf199c27cb84485 as a parameter.
  • connectorWeight: 250000 (see Aragon Fundraising documentation for more info on this)
  • sellAmount: the amount you want to convert. Remember to adjust for 18 decimal precision e.g. 10,000 ANJ = 10000000000000000000000.

Approve market maker contract to withdraw ANJ

You can do this on Etherscan ANJ page using approve function (#2), and the address of the market maker contract,0x5D9DbF55aF65498FaA84BDD4dDe37f7F3f8c7af1, as _spender. _value should be the amount of ANJ that you will use in the next step to convert to ANT.

Open order

Go to Court Fundraising contract on Etherscan and use openSellOrder (#11) to exchange ANJ to ANT.

  • The address of the collateral, ANT, is 0x960b236A07cf122663c4303350609A66A7B288C0.
  • Parameter _amount is the amount of ANJ you are converting. Remember to adjust for 18 decimal precision e.g. 10,000 ANJ = 10000000000000000000000.
Make sure to click the button to view your transaction on Etherscan.

Claim order

Still on that Etherscan Fundraising contract page, once your previous transaction has been mined, you can finally get your ANT tokens calling claimSellOrder (#11), where _seller is your address and _collateral is again ANT address 0x960b236A07cf122663c4303350609A66A7B288C0.

For the _batchId, use the block number of your previous transaction:

Convert to ANJ/ANT on Uniswap

Go to Uniswap and convert obtained ANJ tokens to ANT, or vice versa. You can convert the ANJ tokens to any other token or ETH, but getting ANT / ANJ back makes it easier to repeat the operation.

Source code packages

If you want to do this programatically, instead of using Etherscan and Uniswap frontend, these are the packages you need:

  • @ablack/fundraising-aragon-fundraising

Install dependencies, compile contracts and you have ABI files in build/contracts as usual in a truffle project.

  • Uniswap

Download the repo and install dependencies.

git clone <https://github.com/Uniswap/contracts-vyper> cd contracts-vyper  pip3 install virtualenv virtualenv -p python3 env source env/bin/activate pip install -r requirements.txt 

Then to get the ABI you can use:

vyper -f abi contracts/uniswap_exchange.vy 

Alternatively, you can use the Solidity version from this repo.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us