ByBit Apex protocol

Romano RNR
14 min readApr 28, 2022

ApeX is a decentralized exchange (DEX) created by ByBit. It’s a permissionless and censorship-resistant protocol that allows users to trade perpetual swap markets for any token pairing.

https://apex.exchange

The protocol’s key characteristics are leveraged trading and asset pricing using an Elastic Automated Market Maker (eAMM). Additionally, the protocol rewards users that trade on the marketplace using the ApeX token.

(I will edit this article in the future. Written in a short time-span of a few hours)

Elastic automated market maker (eAMM)

The ApeX protocol is based on an elastic automated market maker (eAMM) paradigm in which price discovery is based on the “constant product” formula. The eAMM replicates the experience of trading on a spot basis and considerably enhances capital efficiency. It enables the supply of a single asset as the base asset while synthesizing the quote asset.

On ApeX, price discovery centers on the AMM model and the Constant Product Formula.

(x * y = k)

ApeX, on the other hand, employs a revolutionary technique known as the Elastic AMM (eAMM), which is patterned by algorithmic stablecoin protocols’ attempts to maintain its peg via the use of on-chain algorithms that adjust supply in response to market circumstances.

The eAMM simulates spot trading and considerably increases capital efficiency by allowing single-asset provision as the BASE asset while synthesizing the QUOTE asset.

ApeX establishes the mathematical link between the specific assets stored in the liquidity pools via the use of a simple

x * y = k equation

The eAMM pool consists of two distinct asset classes. One is the BASE asset (i.e., BTC, ETH, LINK, etc. ), and the other is the dynamically provided QUOTE asset (i.e., USDC).

So to summarize

The eAMM model keeps the BASE asset price pegged to the QUOTE asset price.

The pool is constantly recalibrating itself to ensure that the BASE asset price stays close to the price of the QUOTE asset.

If the BASE asset price starts to fall, the eAMM will automatically buy more of the BASE asset and sell some of the QUOTE assets to keep the price stable.

Conversely, if the BASE asset price rises, the eAMM will sell some of the BASE assets and buy more of the QUOTE asset. This process happens automatically and constantly to keep the price of the BASE asset stable.

Funding Rate

The funding rate pegs perpetual contracts’ prices to the underlying spot price. The rebase mechanism maintains the perpetual contract price within a specified range of the underlying spot price.

If the price of perpetual contracts deviates by more than 3% from the actual spot price, the rebase mechanism is activated. The eAMMs dynamically issue or destroy virtual QUOTE assets to bring the price back within the defined range.

Fees for funding

Funding will be swapped immediately between individuals holding long and short positions based on the difference in spot prices on ApeX and other DEX pools.

Long position holders must pay the AMM when the funding rate is positive. When the funding rate is negative, holders of short positions pay long positions, and the AMM replenishes the differential between short and long positions.

Funding fee = positionValue * Fuding Rate

Liquidity Pool

When users want to add liquidity to the eAMM, they interact with the smart contract and deposit the margin token or BASE asset. The eAMM will mint the QUOTE asset based on the current index price provided by the oracle to keep the price of the BASE asset equal to spot prices on the DEX pool. This action doesn’t affect the price or risk position of the current pool. A user withdraws the BASE asset to remove liquidity from the eAMM, and the eAMM destroys the corresponding QUOTE asset based on the current spot price. This keeps the BASE asset price anchored to spot prices on the DEX pool.

Pool

When users want to add liquidity to the eAMM, they interact with the smart contract and deposit the margin token or BASE asset.

The eAMM will mint the QUOTE asset depending on the current index price supplied by the oracle so that the BASE asset’s price remains equal to the DEX pool’s spot prices. This move does not affect the current pool’s pricing or risk profile.

To withdraw liquidity from the eAMM, the user withdraws the BASE asset, and the eAMM destroys the accompanying QUOTE asset at the current spot price. This maintains the BASE asset’s price linked to the DEX pool’s spot pricing.

Protocol Controlled Value (PCV)

In the traditional TVL model, users are incentivized to provide liquidity to DeFi protocols to receive token distribution rewards. However, this can result in ‘mercenary capital’ as liquidity providers can move their assets to another protocol offering more lucrative rewards.

The PCV model solves this problem by retaining liquidity in perpetuity, as all assets locked in smart contracts are ultimately owned by the protocol. This approach guarantees each perpetual contract market liquidity, and users can rest easy knowing that no liquidity provider can pull out the protocol-owned liquidity.

Coin-collateralized Leverage Trading

Most DEX systems currently handle contracts denominated in USDC. While ApeX will provide USDC-collateralized contracts, we want to focus on the previous market leader.

Stablecoins are not decentralized digital assets on the blockchain. Despite the growing popularity of DeFi and increasingly appropriate situations for the blockchain ecosystem, algorithm-based stablecoins remain uncommon.

ApeX will focus on coin-collateralized contracts to provide leverage trading using only BASE assets. This means that users will not need to use a stablecoin to trade on the platform, which could save on fees. In addition, ApeX aims to establish a platform where the protocol team and DAO can provide liquidity using only the project’s native token. This would facilitate trades and other application scenarios while also alleviating some of the financial burdens on the project.

Referral Program for ApeX Protocols

To generate a referral link, make your way to the referral page and connect your wallet first.

You receive a 50% discount with my link Instead of a 3% from others https://app.apex.exchange/referral/Romano08

This 50% discount fee is for a lifetime because I hold the ApeX OG NFT and am an OG ambassador for the ApeX protocol.

Step 1: Go to the referral page
Step 2: Connect your wallet
Step 3: Click on “I’m invited” (This is required to click)

Step 4: Enter the “Referral Code/Link” (Romano08)

Once you connect your wallet to the App, click on Copy Referral Link, and that’s it.

Your friends can join by following the same progress

Fees and Costs

The ApeX protocol charges a 0.1 percent transaction fee on all transactions. Which allocates as follows:

10% will go to the eAMM’s BASE asset; 30% will go to $APEX staking reward.

The remaining 60% will be held in DAO treasury.
The ApeX protocol charges a Liquidation Fee based on the residual value of the liquidated position.

The following fees will be distributed:
95% will go to the DAO Treasury, and 5% to the protocol liquidator.

Airdrop

Before covering Apex tokens, let’s go over the airdrop first since it will be ending pretty soon.

This airdrop campaign ends on April 30, 2022, at 11:59 p.m. SGT.

(So you have two days left since this article got published)

Over 200,000 $APEX Tokens will distribute this round.

This airdrop is just the first round.

More info: https://apexdex.medium.com/apex-protocol-airdrop-bonanza-round-1-1630d7895131

Apex Tokens

ApeX protocol has a maximum supply of 1,000,000,000. The token serves the following utilities:

Governance: As a token holder, you can submit and vote on protocol governance proposals.
Protocol Incentivization: As a user of the protocol, you can earn ApeX tokens via participation rewards and liquidity mining on the ApeX protocol.
Staking: Users can stake ApeX tokens to earn rewards in ApeX tokens.

Let’s now get into token economics.

Unlocking of $APEX is linear and begins at the start of the second year. The ApeX team gets 15% of the supply, or $150,000,000, with a 12-month cliff and a 24-month vesting term. That is, $APEX will be unlocked after three years.

The team’s $APEX reserve is akin to stock in a firm. The vesting time for latecomers will be extended correspondingly. For example, if A joins the team right away, his cliff term begins with TGE. His $APEX will be progressively unlocked over the next year and completely unlocked in three years. Assuming B joins the team one year after the TGE, his cliff period begins one year after the TGE.

It may take three years or more to ultimately unlock the 15% off $APEX tokens designated for the team, with a percentage of $APEX saved for the future team and the ApeX protocol development.

Dragonfly, Jump Trading, Tiger Global, Mirana, CyberX, Kronos, and M77 Ventures. Each owns 8% of the entire supply of $APEX. Early investors are seed round investors.

They will also have a one-year cliff and a two-year vesting period. APEX will be unlocked linearly after one year and completely redeemable after two years. The strategic DAO allocation, which is 77%, is utilized to grow the DAO ecosystem. Holders of OG and Predator NFTs will get tokens inside this sphere.

4,560 X 4,500 = 20,520,000 $APEX

20 x 1,041,666 = 20,833,320 $APEX given to OG NFT holders $APEX

Holders of Predators NFTs will get $20,520,000 $APEX. Ongoing NFT Burning will release these tokens once the ApeX NFT Game begins. Six months into the game, these tokens will be distributed. If certain NFTs are not burnt before the game's conclusion, their release duration may be prolonged.

Holders of OG NFTs will get a total of $20,833,320 $APEX in a year. During the cliff time, no $APEX will be unlocked. After the cliff, $APEX will be delivered linearly in around a year.

Users may earn $APEX by trading derivatives on the ApeX protocol. There are also three important modules: mining, bonding, and staking, with a 48-month vesting term. The following few chapters will concentrate on bonding and staking.

ApeX protocol provides users with several different ways to earn rewards.

The most common way to earn rewards is by providing liquidity to the protocol’s liquidity pools. This activity incentivizes users to add liquidity to the protocol’s liquidity pools by providing rewards in the form of ApeX tokens. The rewards are paid out proportionally to the amount of liquidity that the user has provided.

Bonding

The ApeX protocol allows users to purchase $APEX at a discount rate by bonding. This is done by creating an eAMM pool, which the user then bonds to. The $APEX purchased will be locked for a period of time, during which the user can earn $APEX by providing liquidity to the eAMM pool.

Bonding allows users to acquire $APEX at a rate. Assume $APEX is priced at 1 USDT, and the bonding discount rate is 5%. In this case, bonding users may get $APEX for 0.95 USDT.

However, the $APEX paid would not be immediately credited. During the 15-day lock-up period, the user’s $APEX purchase will be linearly released.
It will be invested in the eAMM pool for liquidity. The user is now the ApeX protocol’s PCV treasury as a liquidity provider.

Bonding

The bonding mechanism is as follows:

Each bond pool’s eAMM While the eAMM pool is open to all users, and the bond pool must first pass an audit.

The PCV treasury will get the bonding revenues.
The eAMM pool determines the kind of token required for bonding. For the WETH-USDC eAMM pool, users must contribute WETH or ETH. If the pool is WBTC-USDC, the user must donate WBTC.

The bond price oracle in Uniswap V3 determines the bonding price in $APEX. The price of $APEX, the number of tokens issued, and the discount rate all affect how much $APEX delivers to each user who participates in bonding. The bond price oracle on Uniswap V3 will not use the market price to avoid price manipulation by flash loans. Instead, it will utilize the 24-hour TWAP as the bonding reference pricing.

Apex bonding

After successfully investing in the bond pool, the user’s tokens are added to the eAMM for liquidity. The bond pool will generate LP tokens for the PCV treasury.

The user will earn $APEX, which may be used to unlock additional content. The user may withdraw all unlocked $APEX tokens to their account.
Let us provide a simple example to demonstrate the process. Assume a bond pool links to the WETH-USDC eAMM pool with a 5% discount rate. In this case, the bonding user may give ETH or WETH.

$APEX is now worth 1 USDT, whereas ETH is worth 3,000 USDT.

It is possible to purchase 3,157$APX with one ETH instead of 3,001$APX (3,000/1) in this case.

The 3,157 $APEX locks for 15 days (15 X 24). Consequently, linearly unlocking 9 $APEX (3,157/360) each hour.

Up to 18 $APEX is claimed after two hours (9 X 2). After 15 days, the user may claim all 3,157 $APEX in bulk.

Bonding is the principal ApeX protocol mechanism for establishing Protocol Controlled Values (PCV). These eAMM pools, which allow bonding, help maintain liquidity. Bonding users may acquire $APEX at a discount despite the short lock-up duration.

Staking

Staking on the ApeX Protocol allows users to earn rewards in tokens for providing liquidity or holding native tokens.

Four types of tokens can be staked:

ApeX-ETH SLP

ETH-alp

esApeX

ApeX

The first two types of tokens must be staked via izumi.finance, and the latter two types can be staked directly on the ApeX website. Once staked, the user will earn rewards in the form of esApeX, which can be used to claim $APEX or participate in the governance of the DAO.

Staking is available for the following tokens:
Provide APEX-ETH liquidity in other DEXs to earn slp tokens. In the eAMM, ETH-alp is earned by providing liquidity.

ApeX: the ApeX protocol’s native token
For the NFT LP token, staking is required through izumi.finance. On the ApeX website, customers may purchase APEX-LP through eAMM liquidity pools and stake it.

Staking the first two kinds of tokens does not instantly provide access to $APEX. Not esApeX, which must be vested again to collect $APEX.

Users may additionally bet esApeX or $APEX.

Token reward: esApeX
The fee pool supports the last two token kinds. Users may obtain esApeX and veApeX by staking in the fee pool.

veApeX holders have two rights. Primarily, the user may profit from the protocol’s trading fees. Second, users may vote and participate in DAO governance.

To trade on the ApeX protocol, the user pays a 0.1 percent cost, collected as the protocol fee and automatically paid weekly into ETH. Holders of veApeX will get a third of the ETH equally split.

A user can only earn ETH if they have esApeX and/or $APEX staked for the protocol’s security. The veApeX will be recycled after unstaking.
Staking on the ApeX protocol provides variable and set terms, like a regular bank’s savings rate. The floating rate increases with term. Fixed rates are somewhat higher.

Assume both users stake the same tokens. Flexible term loans are cheaper. The user may get the most staking benefits by choosing a one-year fixed term.
Token in the protocol, esApeX. To utilize it outside the ApeX protocol, first convert esApeX to $APEX 1:1.

To maintain stability, the exchange will have a vesting time, after which the converted $APEX may be reclaimed. It is a loss and a penalty if the user withdraws $APEX prematurely. The loss increases with vesting time. When forced withdrawal occurs before vesting time, the user may be able to claim 0.9$APEX with 1esApeX. If the user withdraws his $APEX before the vesting time finishes, he may only claim 0.5 $APEX with 1 esApeX.

Apex NFTs

ApeX protocol debuted its beta version on the Arbitrum mainnet. On March 8, 2022, it issued 4,580 pieces of its initial NFTs with unique qualities to the public.

https://opensea.io/collection/apex-nft-predator

https://opensea.io/collection/apex-nft-predator

ApeX NFT holds the protocol’s governance token subscription interest and its VIPs' proof of equity interest in ApeX’s future loyalty program. Apart from its trading and token equity properties, ApeX NFTs are very collectible as works of art.

The public sale of the ApeX NFT paves the path for the ApeX protocol to connect with and grow its brand value and culture across Web 3.0 audiences.

20 ApeX OG NFTs were sold through whitelist invites.

https://opensea.io/collection/apex-og-nft

These 20 ApeX OG collections owners include prominent leaders, top academics, and investors in DeFi initiatives.

Oh yeah, and then there’s me… I also own 1 ApeX OG NFT

Oh yeah, and then there’s me. I also own one.

On March 8, the remaining 4,560 ApeX Predators NFTs were made available to the public through ApeX’s official website, introducing the protocol to early adopters and bringing the community together.

I also own 20 of the ApeX preditor NFTs.

Launchpad

You can also participate in ByBit Apex Launchpad.

To register, sign up here: https://www.bybit.com/register?affiliate_id=6776&group_id=1653&group_type=1

Spot trading ApeX on ByBit

ByBit listed spot trading APEX tokens on their exchange.

To sign up, you can do so with this link: https://www.bybit.com/register?affiliate_id=6776&group_id=1653&group_type=1

If you use my link, you also receive a $100 bonus

https://www.bybit.com/register?affiliate_id=6776&group_id=1653&group_type=1

Disclaimer: I am invested in ApeX protocol because I bought the ApeX OG NFT (So I invested with my own capital)

However, let me be transparent. I wrote this article because I wanted to. I’m not paid for this. I wrote this article to understand the protocol better and shill my referral link.

For more information:

https://apexdex.medium.com/

Check out their medium and official sources.

Disclaimer: I may have made some mistakes during writing. I wrote this today while being sick.

I’ve also copy/pasted some of their sources and didn’t have the time to fully break it down 100% like you guys are used to.

--

--

Romano RNR

Derivatives trading, investing, cryptocurrency, stocks, forex, options & volatility - programmer & sysadmin