BAMM Unleashed: Transforming Token Trading and Lending

Categories: ResearchPublished On: December 15th, 20235.8 min read

Intro

Currently, when users deposit assets into a liquidity pool, those assets essentially become ‘frozen’ within the contract, underutilized beyond their primary function. Take, for example, a FRAX-USDC pool on Curve – if you contribute $1,000 in USDC, that capital just sits there. Imagine pools on Curve, brimming with millions in tokens, yet all that TVL remains idle, a vast reservoir of static capital.

Enter Frax’s Borrow AMM (BAMM). This innovation by Frax transforms DeFi, offering investors and liquidity providers a groundbreaking opportunity to lend and borrow against LP positions in a capital efficient manner. This is a major breakthrough, especially for DAOs holding protocol-owned liquidity. With around $120 million in locked liquidity, Frax is set to unleash a new era of capital utilization through BAMM.

Borrow Automated Market Maker – BAMM

Imagine a Borrow AMM (BAMM) as a hybrid of a lending protocol and an automated market maker. This combination doesn’t just merge two financial tools; it creates a unique, additional primitive in the process.

To understand how this protocol operates, let’s examine the experiences of both the Liquidity Provider (LP) and the borrower/trader. We’ll start with the LP, whose role is quite straightforward. An LP approaches the BAMM and deposits their LP token or tokens into existing token pairs. For example, they might deposit an LP token representing $1,000 of frxETH and 1,000 USDC. That’s all there is to it! From there, the LP can simply sit back and earn a combination of trading fees and lending rates.

A key inefficiency in traditional AMMs is that the capital locked in their pools isn’t fully utilized. But BAMM changes this. It enables traders to borrow the otherwise idle capital to either long or short assets, significantly enhancing capital efficiency. Here’s a breakdown of how a trader utilizes this capital in the BAMM:

  1. A trader starts by depositing $1,000 worth of frxETH as collateral.
  2. They then borrow $500 worth of USDC from the BAMM’s Liquidity Pool, establishing a Loan-to-Value (LTV) ratio of 50%.
  3. Using the borrowed USDC, the trader purchases an additional $500 worth of frxETH from the same BAMM pool.

After these transactions, the pool’s composition becomes:

  1. frxETH valued at $500
  2. USDC valued at $500

The trader’s portfolio now effectively holds $1,500 in frxETH—$1,000 as initial collateral and $500 from the borrowed amount. As long as the trading position is open, the trader will continue to pay interest on the borrowed sum to the LP.

NOTE: The official documentation for BAMM is not yet released, so the details and calculations shared here are based on preliminary information. Actual mechanics and figures may vary once the full documentation is available. Always do your own research.

To achieve a similar outcome with existing DeFi tools, a trader would typically:

  1. Deposit $1,000 worth of frxETH as collateral into a platform like Aave.
  2. Borrow $500 in USDC from Aave.
  3. Exchange the borrowed USDC for frxETH on a platform such as Uniswap.

However, let’s consider a scenario in BAMM where the price of frxETH declines.

Should the value of frxETH drop by 40%, the collateral’s worth would reduce to $600. This scenario results in a Loan-to-Value (LTV) ratio of 83%. As this LTV surpasses the liquidation threshold, the BAMM system would begin to methodically liquidate the frxETH collateral to reimburse the LP.

The process of soft liquidation mirrors the dynamics of establishing a one-sided range in Uni V3. Your assets stay as your chosen collateral as long as the market is outside this set range. But, if market trends start to go against your position, your collateral begins to enter a ‘soft liquidation’ phase, gradually transitioning into the borrowed currency. Should the market swing back favorably, you’ll repurchase your initial assets. Conversely, if the market continues to move adversely, you’ll reach the range’s limit, leading to a full liquidation. This is similar to Curve’s crvUSD LLAMMA model.

Another advantage of BAMMs is their ability to simplify shorting tokens, a process often challenging with current lending protocols. For example, shorting highly speculative ‘meme’ tokens is difficult since it’s hard to find the necessary liquidity and markets. Usually, the only option is to use a CEX that offers a perpetual futures pair, and often, this option becomes available only after the optimal shorting window has passed.

BAMMs, being permissionless, allow anyone to establish a lending pool. This means liquidity providers for pairs like Shiba/USDC can create their own BAMM pool. Here’s how a trader would use this pool to short a token:

  1. The trader deposits $1,000 in USDC as collateral.
  2. They borrow Shiba tokens worth $500.
  3. Shiba tokens are then swapped for an equivalent $500 in USDC.
  4. If the value of Shiba Inu falls by 50%, the borrowed amount is now worth only $250.
  5. The trader repays the Shiba worth $250, realizing a profit of $250 in USDC. And that’s the BAMM effect!

BAMM introduces a streamlined and efficient way to short tokens or hedge against market risks, options that were previously limited or unavailable.

There are several key benefits to using BAMM compared to traditional lending protocols:

  1. Elimination of Oracle Risk: With all required liquidity contained within the Liquidity Pool, BAMMs eliminate the need for external oracles. This absence removes the concerns associated with oracle exploits or failures.
  2. Enhanced Yield for Liquidity Providers: Liquidity in BAMMs is utilized for both trading and lending, leading to higher potential earnings due to increased capital efficiency.
  3. Expanded Lending Pair Options: The independence from oracles and the self-contained liquidity enable the creation of numerous lending pools, offering a vast array of trading and lending pairs.

Additionally, Frax’s BAMM is set to incorporate an exciting feature: bribe mechanics. Scheduled for launch on Fraxchain in January 2024, this innovative DeFi primitive is poised to catalyze a significant influx of liquidity. Hosted on Fraxchain, it’s expected to attract a multitude of investors eager to engage with this novel financial product. This platform will not only enable investors to earn yield through LPs but also to supply their LPs and borrow against them, all with minimal risk of liquidation.

BAMM is set to change the game for AMMs. It’s more than just about asset swaps in isolation, its deployment introduces a fresh revenue stream for LPs. A major critique of AMMs has been their limited revenue generation compared to CEX-based market making, where spreads are dynamically adjusted in response to volatility and market conditions. With BAMM, we’re looking at a potential boost in revenue for on-chain LPs, leveling the playing field with CEX CLOBs.

In 2024, Fraxchain will be the exclusive host for the launch of BAMM, potentially triggering an influx of assets eager to utilize this groundbreaking liquidity lending system. This move reaffirms Frax’s position as a pioneer in the DeFi technology space.

Sources

Michael’s Tweet

“x*y=k” BAMM! The Path to 100% CR for Frax – Cryptovestor’s Alpha Corner #8

The Math Behind BAMM Lending

Written by: Qorban Ferrell


Stably is a venture-backed FinTech from Seattle, Washington. We provide regulatory-compliant stablecoin and onramp infrastructure for emerging blockchains, Web3 applications, and financial institutions, enabling their users in 170+ countries/regions to easily buy, sell, or swap digital assets at competitive rates across multiple blockchain networks with stablecoins and fiat payments. Our mission is to power the next billion Web3 users with a superior fiat & stablecoin onramp.

For all inquiries, feel free to contact us.

Follow Stably: X (Twitter) | Linkedin | Facebook |

RISK DISCLAIMER: Digital assets involve significant risks, including (but not limited to) market volatility, cybercrime, regulatory changes, and technological challenges. Past performance is not indicative of future results. Digital assets are not insured by any government agency and holding digital assets could result in loss of value, including principal. Please conduct your own thorough research and understand potential risks before purchasing/holding digital assets. Nothing herein shall be considered legal or financial advice. For more information about the risks and considerations when using our services, please view our full disclaimer.