Try ALEX Bitcoin DeFi Now →
Whitepaper 1: Automated Market Making of the Yield Token Pool
September 27, 2021


ALEX Bitcoin DeFi aims to provide fixed rate borrowing and lending services with pre-determined maturity in the world of decentralized finance (DeFi). We’ve included forward contracts in our trading pool, with an Automated Market Making (AMM) engine utilizing Generalized Mean. We have formalized the trading practice of swapping forward contracts on the underlying asset, and we’ve incorporated the latest innovation in DeFi — concentrated liquidity. Consequently, liquidity providers on ALEX are able to save significant capital by market making on a selected range of interest rates.


ALEX stands for Automated Liquidity EXchange. It is a hybrid of automated market making and on-chain loan-able fund built on Bitcoin via Stacks. While lenders and borrowers can minimize uncertainty by securing loans with fixed rate and tenor, liquidity providers are able to take advantage of our capital efficiency mechanism by imposing a cap and floor on the interest rate. This allows liquidity to be offered on parts of the curve that contains the majority of trading activity and leads to efficient capital management.

On ALEX, lending and borrowing activities are facilitated by a forward contract based token “ayToken”. It is similar to an OTC bilateral forward contract in the conventional financial market, which specifies underlying asset “Token” and expiry date. This paper assumes ayToken is minted and ready to be exchanged. Lenders purchase ayToken at a discount to the spot Token price when the contract is initiated and reclaim the underlying asset upon expiration when forward price converges to spot price. Borrowers sell ayToken in return for Token on day one and return Token upon expiration. The implied interest rate depends on how discounted the forward price is to the spot price at the time of transaction, which is executed on the AMM.

Last but not least, ALEX hopes to bridge the gap between Defi and conventional finance by applying an AMM protocol derived from one of the basic instruments in the fixed income market — the zero coupon bond first proposed by Yield Space. This empowers ALEX to both learn from the fiat world and offer more decentralized financial products in the future.

This paper focuses on technical aspects of the AMM and is the first of a series of ALEX papers unveiling all the exciting features and applications ALEX is developing.

AMM and Invariant Function

ALEX AMM is built on three beliefs: (i) it is mathematically neat and reflects economic demand and supply; (ii) it is a type of mean, like other AMMs; and (iii) it is derived and can be interpreted in terms of yield and can be connected to conventional finance, where research has been conducted for decades.

We will first review some desirable features of the AMM that ALEX hopes to exhibit.

Properties of AMM

Meanwhile, f can usually be interpreted as a form of mean, for example, mStable relates to arithmetic mean, where x₁+x₂=L (constant sum formula); one of the most popular platforms Uniswap relates to geometric mean, where xx₂=L (constant product formula); Balancer, which our collateral rebalancing pool employs, applies weighted geometric mean. Its AMM is:

where w₁ and w₂​ are fixed weights. However, none of these three protocols consider time to maturity, which is essential in modern interest rate theory.


After extensive research, we consider it possible for ALEX AMM to be connected to generalised mean defined as:

In the benchmark research piece by Yield Space, the invariant function above is formalized from the perspective of zero coupon bond. p is replaced by 1−t where t is time to maturity and L is a function of t, so that

In the rest of the paper, to be consistent with Yield Space, we employ notations below

  • x : balance of the underlying Token
  • y : balance of ayToken
  • r : implied interest rate, defined as the natural logarithm of balance of ayToken and Token

Though purely theoretical at this stage, Appendix 2 maps L to the liquidity distribution of Uniswap V3. This is motivated by an independent research from Paradigm.

Trading Formulae

Market transactions, which involves exchange of Token and ayToken, satisfies the invariant function. While fee is deposited back to the liquidity pool in some protocols, such as Uniswap V2, resulting in slight increase of L after each transaction, ALEX counts the fee separately. This is consistent with Uniswap V3. Hence L remains constant.


Figure 1
Figure 2
Figure 3