Sitemap

SwapX Protocol

6 min readSep 10, 2020

--

Press enter or click to view image in full size

Origin

As the leader in AMM-based DEXs, Uniswap has become an industry standard upon which many projects have adopted its principles and model.

However, AMM-based DEXs are still in their early days, and there is much room for improvement in terms of user experience, transaction fees, liquidity pool management, asset classes, trading speed, etc. Balancer, Curve, and SushiSwap have already made some progress, but they are still not meeting users’ expectations.

SwapX, inspired by Uniswap, has made key upgrades on Uniswap and implemented a number of new features, particularly on token incentives. We believe these features will improve the design of the protocol and benefit participants even more.

Protocol design

Press enter or click to view image in full size

Pool Token (Liquidity Provider Token)

On SwapX, Pool Token is the proof provided by the liquidity pool (a.k.a the liquidity provider token, or LP token). Whenever new funds are deposited into the liquidity pool, the liquidity providers (LP) receive a certain amount of Pool Token, which represents the providers’ total funds proportion of the liquidity pool (Pool Share). Pool Token is an ERC-20 token that can be freely transferred and traded. As funds are withdrawn, the Pool Token will be destroyed.

Pair Token

Pair Token is the credential for governance in individual liquidity pools on SwapX. In each liquidity pool, liquidity providers would gather as a sub-community, gaining autonomy for future upgrades and development of the liquidity pool. Pair Token is an ERC-20 token that can be freely transferred and traded. In addition, the Pair Token also serves as the credential to determine distribution of SWP, the governance token of SwapX.

1. Pair Token rules.

  • Total number available: 5.76 million per liquidity pool.
  • Only ‘ERC20-USDT’ pools will generate Pair Tokens in V1, and more types of pools will support Pair Tokens in V2
  • Name: ‘trading pair + X’ e.g. ETHUSDTX.
  • Allocation ratio:

85% of Pair Token is distributed to S-token holders based on their S-token position

15% is distributed to the community for community incentives, R&D, daily operation and maintenance and risk reserve, etc. The community determines the usage and amount to be used through governance voting, and regularly disclosure usage for public review.

2. Pair Token Mining

  • Mining rule: ‘Holding as farming’ (Pair Tokens that have not been claimed to a personal wallet address in the contract also count as a holding position)
  • Duration: Farming ends in 30 days
  • Reward distribution cycle: Daily
  • Snapshot frequency: Every 15 minutes (64 blocks)

For each reward cycle, select the block whose numbers are closest to start and end times to determine the ‘Start Block’ and ‘End Block’. In every 64 blocks (every 15 minutes), one Snapshot Block will be generated, counting backwards from the End Block until it reaches the Start Block, to count and confirm all Snapshot Blocks.

During the reward cycle in each Snapshot Block, the pool token reward distribution is based on how much pool token this address holds compared to the total pool token amount.

Claim your reward:

All Pair Tokens earned from yield farming will not be allocated automatically. But the number of mining rewards, earned by each wallet address, will be recorded on a smart contract. Users should initiate the requests on smart contracts and pay the corresponding gas fee to claim their reward.

Users can check the total amount of unclaimed Pair Tokens in their Ethereum account through the smart contract anytime.

Liquidity Incentives Using SWP

SWP, the SwapX platform governance token, is 100% distributed through mining. SWP is released linearly through the mining algorithm with no reserve or pre-mining of tokens. SWP is mainly used for liquidity incentives, trading, governance voting, and certification fees.

SWP Token rules

Total number: 5.76 million

Name: SWP

Get SwapX’s stories in your inbox

Join Medium for free to get updates from this writer.

Allocation ratio:

  • 50% is allocated to Pair Token holders through mining, totaling 2.88 million.
  • 50% is allocated to LP Token holders of each of the top DEXs through mining, totaling 2.88 million. Top DEXs include Uniswap, Balancer, Curve, etc.
  1. Pledge LP token to Mine SWP
Press enter or click to view image in full size
  • Total number: 2.88 million SWP
  • Mining Rules: 30 SWPs can be mined per block until all 2.88 million are mined out (~2 weeks), and the smart contract will allocate SWPs to each LP Token pledger based on their provision.
  • Claim reward: All SWP obtained from mining will not be allocated automatically. Instead, users need to initiate a request to the smart contract and pay the corresponding gas fee to claim their reward.

2. Holding Pair Token while Mining SWP

  • Mining method: ‘Holding while mining’ (Pair Token that is not yet claimed to a personal wallet address is counted as a holding position)
  • Total number available: 2.88 million SWP
  • Mining cycle: Complete in 30 days
  • Mining rules: According to the snapshot block in each reward cycle, SWP is distributed to a liquidity pool based on its value contribution to the total value of SWP mining.

According to the snapshot block in each reward cycle, SWP is distributed to liquidity providers in each liquidity pool based on the proportion of the individual contribution to the total value in SWP mining.

  • Reward cycle: daily
  • Snapshot Frequency: 15 minutes (64 blocks), same as Pair Token.

Token Certification (optional )

Uniswap, Sushiswap, Balancer, and Curve are fully decentralized but full of fraudulent tokens. Users are struggling to distinguish fraudulent from legitimate tokens. On SwapX, we provide an optional token certification service to help solve this problem.

Sustainability

To ensure the long-term viability and sustainability of the project, SWP tokens from mining will be used to fund development and future upgrades. SWP tokens may be used for services, including code security audits, smart contracts and feature upgrades, and front-end development to facilitate users’ access to the protocol.

Migration

About two weeks (or about 100,000 blocks generated) after the protocol is initially established, we will migrate all LP tokens pledged on the SwapX protocol. The migration redeems all LP tokens of Uniswap, SushiSwap, Balancer, and Curve on corresponding DEX platforms and initiates new liquidity pools. These new pools will be nearly identical to the standard Uniswap, SushiSwap, Balancer, and Curve pools with added features. Any fee generated in the liquidity pool will be shared with SWP token holders as such: SwapX will charge traders a 0.3% transaction fee, of which 0.25% will be allocated directly to liquidity providers and 0.05% will be allocated to the community for SWP buybacks.

When the migration is complete, the converted liquidity will be injected to SwapX liquidity pools. The liquidity providers do not need to do anything but simply provide liquidity by farming the Pair Token and SWP Tokens.

Use of Protocol

From the perspective of a protocol and smart contract, SwapX shares the same API with Uniswap. This means that if your protocol is currently compatible with Uniswap, it can be integrated with SwapX. We also adopt the familiar Uniswap user interface and front end to make the conversion as unobtrusive as possible for protocol users.

Security Audit

All smart contracts have been audited by the developer community and are publicized on GitHub for all participants to review here: https://github.com/SwapX-Team

Smart Contract

SWP Token contract code:

https://github.com/SwapX-Team/SwapX-v1-core/blob/master/contracts/token/SwapXGovernToken.sol

SWP smart contract is the only minter of the SWP token

SwapX routing contract code:https://github.com/SwapX-Team/SwapX-v1-periphery

SwapX contract core code:https://github.com/SwapX-Team/SwapX-v1-core

SwapX reward claim contract code:https://github.com/SwapX-Team/SwapX-v1-redeemable

The following addresses are where on Ethereum mainnet SwapX deploys its contracts:

Factory:0xbec1C22fA669Bf17b9d2326Beb9Adce4fC697614

Router:0x917f3F8D22Af0AedBe9491002F0c6838769E2925

Redeem:0xEf7920E4808e92724F438C572a38BC459463e09d

SWP:0xDA3145d0A373712E036106FC1fa34b1014807e68

How to participate?

You can start mining SWP tokens now on app.wapx.org, and you will start to receive SWP token rewards at 12am on 9/11/2020.

Follow Us

Twitter:

https://twitter.com/SwapXOfficial

Telegram:

https://t.me/SwapX_org

Discord:

https://discord.gg/3EMYeXN

--

--

SwapX
SwapX

Written by SwapX

www.swapx.org Automated Token Swap and Liquidity Protocol