A simple technical overview to understand the mechanics of Behodler.io DEX

Otto von Wachter
5 min readApr 8, 2021

Tomorrow the Liquidity Queue Event will start on the Behodler.io DEX. This is an exciting project, and it has a lot of technical nuances. This article is meant to break down some of obstacles and confusion that is naturally present in understanding a sufficiently complex system.

I will cover 3 primary topics that are needed to fully understand the Beholder.io DEX:

  • What is it? A single-sided AMM with single liquidity token
  • Liquidity Queueing & price tilting
  • Fee-on-transfer & residual liquidity

NOTE: This article is quite dense, but it follows a logical progression. Please comment if clarification is needed!

Behodler DEX: Single-sided AMM, Single Liquidity Token (SCX)

The most popular AMM is, obviously, Uniswap. Uniswap is a two-sided AMM, meaning, that each liquidity pool has a pair-liquidity-token. For example, if I want to add liquidity for $EYE pool, I add equal amounts of EYE and ETH.

However, there are also single-sided AMMs. A single-sided AMM means there is no pair. Aside from Behodler.io, Bancor is another example of a single-sided AMM. This means you just contribute one token you want to provide liquidity for, and you get back a token representing the liquidity.

The way a single-sided AMM works is via a well-known cryptocurrency concept called bonding curve

A bonding curve is a mathematical concept used to describe the relationship between price and the supply of an asset.

The basis of the bonding curve is the idea that when a person purchases an asset that is available in a limited quantity (like Bitcoin), then each subsequent buyer will have to pay slightly more for it.

Bonding curves can exist with different shapes (i.e. different mathematical functions). Behodler uses a logarithmic bonding curve, and more specifically a log base 2 bonding curve. There are presumably very good reasons for this particular choice of bonding function, and a big reason is gas efficiency. This is one of the reasons why Behodler.io can perform token swaps at half the transaction cost of Uniswap (!!)

Single Liquidity Token, Omni-Schedule Bonding Curve

For the Behodler AMM, Scarcity (symbol SCX) is the single liquidity-index token. SCX is minted simply by buying SCX on the Behodler.io exchange.

But, here is a conundrum. Since SCX needs to provide liquidity for (and can be bought with) different tokens, how is the price of SCX determined? The answer to this question is another big term: The SCX smart contract uses an omni-schedule bonding curve: Each token has its own bonding curve that determines its price relative to SCX.

The supply of SCX relative to each token grows logarithmically. This means that each linear unit of tokens added to the Behodler DEX returns 1/2 the amount of SCX. This also implies that the earlier you buy SCX, the more liquidity you own in the long term (!)

Arbitrage will balance the price of SCX between different tokens.

The future will tell whether this logarithmic omni-schedule bonding curve system will prove successful, but a lot of thought has gone into this by Justin Goro and the Behodler team. The reduced gas fees will certainly be a big motivation to use Behodler.

Liquidity Queueing

Liquidity Queuing has one primary goal: To mint more SCX, which means the DEX has more liquidity.

Liquidity Queueing (Abbreviated as LQ), is a similar concept to the liquidity mining programs that many projects use, but with a completely innovative twist.

Liquidity mining usually works by going to Uniswap and adding some token plus Ether to a liquidity pool. Your wallet is credited with Liquidity Pool (LP) tokens. Then you may be able to stake LP tokens on another website for additional rewards. A liquidity mining program encourages liquidity in the token and runs for a specific period of amount of time, for example 2 months.

Liquidity Queueing, as opposed to staking, is meant to be ongoing.

How it works is that you contribute a single token, and by doing so you enter the queue (abbreviated as Q below). Your tokens are paired with tokens from a different “vault”. The full process goes something like this:

  • You contribute a single token (4 tokens should be available at the start of beta program: )
  • You enter the Q. The amount of time you will spend in the Q depends on the rate other people enter after you
  • LP tokens are purchased for you.
  • Upon exiting the Q, the LP tokens are sent to your wallet. Now you can (if you choose) unpair your LP tokens (on Uniswap) and enter the Q again.
Input tokens and reward pairs

LQ entrants will receive a couple of different types of rewards, which is exciting, but not necessary to discuss for the understanding of the Behodler DEX.

Note: this is my best understanding at this point. The beta program will start in just a few hours, so this article may be updated.

Price Tilting

Price tilting is meant to increase the price of a certain token on Uniswap versus to the price on Behodler. This encourages more minting on Behodler and selling on Uniswap (or other DEX). The way this works is that Uniswap allows the ratio of the token pairs to be specified (programmatically, not via the Uniswap UI). The ratio is specified so that the implied price of SCX is slightly higher than the current market price.

This also creates a feedback loop that encourages a faster-moving Q.

Liquidity Queue Beta Participation

The Liquidity Queue is scheduled to launch on April 9 at Noon UTC. In order to participate you will need to already have either one of these two LP tokens:

  • EYE/SCX (any amount, you are required to stake 10% of your LP tokens)
  • EYE/ETH (1,000 EYE minimum are required to be staked)

You will need stake one of these LP tokens on the Behodler.io, before participating in the Q (this is step is completely independent of the Q itself).

Fee-on-transfer and Residual Liquidity

SCX is a fee-on-transfer token. That means that every time you interact with the token, for example, buy, sell, etc. a small fee is subtracted. Of this fee 1.5% goes to treasury for rewards (for LQ) and 0.5% is burnt (To be confirmed)

The net effect of the burning of SCX is that a residual liquidity is created, i.e. liquidity that can never be accessed again. This is a unique feature of Behodler, unlike other DEXes like Uniswap, and it is meant to give Behodler increased stability.

Sources and Further Reading:

Bonding curves: https://medium.com/linum-labs/intro-to-bonding-curves-and-shapes-bf326bc4e11a

Liquidity Queueing Explained: https://medium.com/weidaithriftcoin/liquidity-queueing-tl-dr-7bb3aff58162

All Behodler articles on Medium: https://medium.com/weidaithriftcoin/latest

Beholder2 Github Readme: https://github.com/WeiDaiEcosystem/behodler2

LiquidQueue Github Readme: https://github.com/WeiDaiEcosystem/LiquidQueue

--

--