Permaswap Network uses AMM technology and is a fully decentralized, distributed P2P trading network.
https://mirror.xyz/permaswap.eth/ustZcDgavlm4xmYI26thEAj8W2cXlZpRkG5Jqz0iS14。
Users can provide liquidity to Permaswap by running Permaswap's LP client.
Similar to the provision of liquidity to Uniswap, the provision of liquidity requires a certain amount of capital from the liquidity provider (i.e.LP), who can set the price range for market making and the amount of capital to be provided, while the LP receives a fee as income, it may also incur some impermanent loss.
Unlike Uniswap
The currently available LP clients for Permaswap are:
This article is a tutorial for Golang LP clients, which liquidity providers can follow to deploy LP nodes for automated AMM market-making in the Permaswap network.
Introduction of everPay:
https://everpay.zendesk.com/hc/en-us/articles/4404204530201-Introduction-to-everPay
Assets on everPay:
https://everpay.zendesk.com/hc/en-us/articles/4405069888537-What-is-everPay-balances-
Testnet users can also receive test tokens from the faucet of everPay to test products.
https://faucet-dev.everpay.io/
everPay currently supports the Ethereum and Arweave chains.
Users can generate accounts with Metamask wallets or Arconnet wallets and hold trading assets in everPay.
Test environment: You need to have tUSDC and tAR. tUSDC these can be obtained through the test environment faucet.
Providing liquidity requires having at least two assets. For example, to provide liquidity to a pool of tUSDC-tAR pairs, the user needs to hold both tUSDC and tAR assets.
After obtaining tUSDC from the faucet, users can swap to obtain tAR or tADRIVE, thus making a market for the corresponding trade pair pool.
Production environment: Users need to top up their assets to everPay.
Tutorials: https://everpay.zendesk.com/hc/en-us/articles/4404197313433-Deposit
The following configuration is recommended for using the Golang version of the CLI client:
Environmental Label:testnet
ChainID:5
URL:
Supported token information:
token | token tag | decimals | Describe |
---|---|---|---|
tAR | bsc-tar-0xf1458ee7e9a2096bce7a21c160840a3a291bcb55 | 12 | |
tARDRIVE | bsc-tardrive-0xf4233b165f1b8da4f9aa94abc35c9ad2a7612979 | 18 | |
tUSDC | bsc-tusdc-0xf17a50ecc5fe5f476de2da5481cdd0f0ffef7712 | 6 |
Pool information for supported pairs:
Pool | Pool ID | token-x | token-y | Rate |
---|---|---|---|---|
tAR-tUSDC | 0xb57de84c67306cc740021ba9ec328d9b2e351b2196caf96d8a6117a6e6bc680a | tAR | tUSDC | 0.3 % |
tAR-tARDRIVE | 0x196ca0c5e44d776e1d7ee1e6485030ea43ee4bad225e3312685048827eaf2a92 | tAR | tARDRIVE | 0.3 % |
Environmental Label:mainnet
ChainID:1
URL:
Supported token information:
token | token tag | decimals | Describe |
---|---|---|---|
AR | arweave,ethereum-ar-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,0x4fadc7a98f2dc96510e42dd1a74141eeae0c1543 | 12 | Native token on Arweave |
ETH | ethereum-eth-0x0000000000000000000000000000000000000000 | 18 | Native token on Ethereum |
USDC | ethereum-usdc-0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 | 6 | USDC erc20 token issued on Ethereum |
USDT | ethereum-usdt-0xdac17f958d2ee523a2206206994597c13d831ec7 | 6 | USDT erc20 token issued on Ethereum |
Pool information for supported pairs:
Pool | Pool ID | token-x | token-y | Rate |
---|---|---|---|---|
AR-USDC | 0x0750e26dbffb85e66891b71b9e1049c4be6d94dab938bbb06573ca6178615981 | AR | USDC | 0.3 % |
AR-ETH | 0x5f0ac5160cd3c105f9db2fb3e981907588d810040eb30d77364affd6f4435933 | AR | ETH | 0.3 % |
ETH-USDC | 0x7eb07d77601f28549ff623ad42a24b4ac3f0e73af0df3d76446fb299ec375dd5 | ETH | USDC | 0.3 % |
USDC-USDT | 0xdb7b3480f2d1f7bbe91ee3610664756b91bbe0744bc319db2f0b89efdf552064 | USDC | USDT | 0.05 % |
Download the Linux Lp client Permaswap.linux.tar.gz from the official website.
Test environment*:https://app-dev.permaswap.network/#/pool*
Production environment*:https://app.permaswap.network/#/pool*
After downloading and unzipping, there are three files lp, lpconifg, and run.sh:
Generating the profile for lp market making is a 2-step process:
lpconfig --info --network testnet
lpconfig --network testnet -p {{poolid}} -low {{lowest price for market making}} -current {{current price}} -high {{highest price for market making}} -x {{amount of token x}} -c {{path of configuration file}}
Among them
-p poolid is the id of the pool, obtained from the first step;
--network Set the network to connect to, either testnet or mainnet;
-low The lowest price for market-making;
-current Current price;
-high The highest price of market-making;
-x -y The number of tokenX or tokenY in the x - y market-making calculation is only one, and the number of tokens needed for the other will be calculated automatically;
-c Path to the configuration file;
Example:
lpconfig --network testnet -p 0xb57de84c67306cc740021ba9ec328d9b2e351b2196caf96d8a6117a6e6bc680a -low 1 -current 10 -high 20 -x 100 -c lp_config.json
The above command will generate a configuration file for pool 0xb57de84c67306cc740021ba9ec328d9b2e351b2196caf96d8a6117a6e6bc680a( tAR-tUSDC )Market-making lp profile。
The price range is 1 tUSDC / tAR - 20 tUSDC / tAR, the current price is 10 tUSDC / tAR and the number of tokenX (i.e., tAR ) of the market-making funds is 100. The generated configuration file is lp_config.json in the current directory.
If the price range is full range, add option -f. The options -low and -high do not need to be provided.
Example:
lpconfig --network testnet -p 0xb57de84c67306cc740021ba9ec328d9b2e351b2196caf96d8a6117a6e6bc680a -current 10 -y 1000 -c lp_config.json
Generate a configuration file for pool 0xb57de84c67306cc740021ba9ec328d9b2e351b2196caf96d8a6117a6e6bc680a(tAR-tUSDC) Market making lp profile, The price range is full-range, The current price is 10 tUSDC / tAR, Market-making funds tokenY( i.e. tUSDC )The number of 1000。 The generated configuration file is lp_config.json。
There is already an lp configuration. To add a second lp configuration information, specify the -c option as the lp configuration file for the existing configuration.
Example:
lpconfig --network testnet -p 0xb57de84c67306cc740021ba9ec328d9b2e351b2196caf96d8a6117a6e6bc680a -current 10 -y 1000 -c lp_config.json
At this time lp_config.json the configuration information for the first lp is already included, and the second lp configuration information is added at the end of the file.
Modify the environment variables in the run.sh run script to:
PERMA_WS、PERMA_HTTP、LP_CONFIG、ECC_PRIVATE/AR_WALlET。
Among them:
PERMA_WS is the Router's WebSocket address.
PERMA_WS is the Router's HTTP address
The test network is set to
export PERMA_WS="wss://router0-dev.permaswap.network/wslp"
export PERMA_HTTP="[<https://router0-dev.permaswap.network>](<https://router0-dev.permaswap.network/>)"
Official network:
export PERMA_WS="wss://router.permaswap.network/wslp"
export PERMA_HTTP="[<https://router.permaswap.network>](<https://router.permaswap.network/>)"
LP_CONFIG for your lp profile
If you are making a market with an eth account, ECC_PRIVATE is set to the private key of your prepared wallet. If you are using the Arweave account for market making, AR_WALlET is set to your Arweave wallet file path.
export PERMA_WS="wss://router0-dev.permaswap.network/wslp"
export PERMA_HTTP="<https://router0-dev.permaswap.network>"
export LP_CONFIG="./lp_config.json"
export AR_WALLET="ar_wallet.json"
#export ECC_PRIVATE=""
./lp