Sooper

Posted on Dec 16, 2022Read on Mirror.xyz

Credit Where It's Due: What is Frax Finance?

Introduction

Frax Finance is a stablecoin protocol where anyone can use crypto collateral to mint the $FRAX stablecoin. Frax stands out with its partially-algorithmic, “hybrid” design, and is the first fractional reserve stablecoin ever. It is the fifth largest stablecoin by market cap, is the top-ranking player of the famous “Curve Wars”, and is live on over a dozen chains with over $1 billion TVL.

Frax’s staple product is its stablecoin, and it scales horizontally with its frxETH liquid staking derivative, permissionless lending pools on Fraxlend, and even its own “Frax Price Index” ($FPI) all in order to keep $FRAX strong.

The Problem

Simply put, mastering stablecoins is hard. Stablecoins suffer from their own “trilemma” like blockchains do, which includes capital efficiency, stability, and decentralization.

Top-ranking stablecoins like $USDC, $USDT, $DAI, and $BUSD tradeoff massive centralized counterparty risk to maintain their reputable stability. On the other hand, decentralized stablecoins struggle with longterm stability or meaningful capital efficiency. Many are unable to scale using only decentralized collateral like $ETH, and those that do meaningfully scale often achieve this with risky, purely algorithmic models that just aren’t sustainable.

The Goal

Frax addresses all three pillars of the trilemma by combining the collateralized and algorithmic models together. Frax is able to burn part of the value people are using to mint $FRAX, and has improved the core protocol to earn yield on collateral when it’s safe to do so.

It has a reputation for its peg strength around $1, and maintains its backing algorithmically based on various demand metrics. With its own integrated AMM, an $ETH liquid staking platform, and lending and borrowing pools that anyone can create, Frax will go beyond just an average stablecoin protocol.

How Does it Work? Frax v1

$FRAX is a dollar-pegged stablecoin that takes advantage of totally transparent fractional reserves to maintain its peg. $FRAX can be minted 1:1 with accepted collateral value, and its peg mostly relies on the market being able to profit whenever $FRAX is not $1. When off peg, each $FRAX can be minted with $1 of value and redeemed for $1 of value.

When $FRAX is over $1, minting it for $1 then selling it for more than $1 is profitable. This expands $FRAX supply and encourages sell pressure whenever $FRAX depegs upwards. Similarly when $FRAX is under $1, buying it for less than $1 then redeeming it for $1 is profitable. This contracts $FRAX supply and encourages buy pressure whenever $FRAX depegs downwards.

Infographic explaining $FRAX and its notable features

So what about the fractional reserves part? Well, depending on $FRAX’s current collateral ratio, the $1 of value when minting or redeeming $FRAX may not be 100% collateral. Instead, this $1 of value may be partially collateral (ex: $USDC) and partially $FXS. The protocol adjusts the collateral ratio based on changes in $FRAX demand.

A 100% collateral ratio would mean $FRAX is minted and redeemed 1:1 with $USDC. However, a lower collateral ratio like 98% would mean 2% of the value used to mint $FRAX must be $FXS, and 2% of $FRAX redemption value is returned as $FXS.

For each $FRAX minted, the $0.98 of $USDC would be deposited as collateral reserves and the $0.02 of $FXS burned. On the other hand, every $FRAX redeemed would return $0.98 of collateral and $0.02 of freshly minted $FXS.

No matter what the collateral ratio is, $1 of value is needed to mint 1 $FRAX, and $1 of value is redeemable with 1 $FRAX. The CR simply determines the make-up of this $1 value; how much is collateral and how much is $FXS. Collateral types backing $FRAX are visible in the Investor AMO distribution.

The relationship between collateral ratio (CR) and minting/redeeming $FRAX

$FRAX is able to attract deep liquidity thanks to its involvement in the Curve Wars. Frax has built a massive veCRV warchest to boost $FRAX yields on their Curve Finance liquidity pools.

One of these pools is a FRAX-USDC liquidity pool called the “Frax Basepool”. In this, FRAXBP can act as a base pair for any other assets to create what are called “metapools” ($MIM/FRAXBP). Frax collects trading fees and $CRV rewards from all FRAXBP metapools, and perpetually max-locks all the $CRV it earns for veCRV. Protocols pairing against FRAXBP directly benefit from Frax incentivizing with its veCRV, and this effect only grows as more FRAXBP pairs are created.

In Frax v1, the protocol would use an integrated stability mechanism that automatically changed the collateral ratio based on the price of $FRAX. Now in v2, Frax deploys smart contracts called “AMOs” which adjust the collateral ratio whenever $FRAX is above or below $1.

How Does it Work? Frax v2

Frax v2 expands far beyond the primitive version of protocol. It strives for an ambitious $FRAX product suite and takes a modular approach with Algorithmic Market Operations Controllers (AMOs) that boost overall capital efficiency tenfold.

AMOs basically implement code-based monetary policy around $FRAX and its $1 peg. Several different AMOs enforce the basic, universal price stability mechanism from v1 on top of some yield-earning operation(s) specific to the AMO. The stability mechanism has four facets:

  • Recollateralize while $FRAX is below $1

  • Decollateralize while $FRAX is above $1

  • Market Operations while $FRAX is stable at $1

  • FXS1559 sets the standard for $FXS value capture

AMOs raise the collateral ratio while $FRAX is below $1, and lower it while $FRAX is above $1. The collateral ratio stays the same while $FRAX is stable at $1. These changes are simply responses to market demand for $FRAX in its current state.

In other words, CR adjustments are automated around the market’s changing perception of a “fair” or safe collateral ratio for $FRAX. $FRAX below $1 suggests demand has decreased, maybe because the the current CR is perceived as “unsafe”. $FRAX above $1 suggests demand has increased, and the market is more than comfortable with the current CR. $FRAX stable at $1 suggests the market is content with the current ratio as it is.

So, since the CR changes and stabilizes as a result of the market’s demand for $FRAX, the market ultimately decides what the $FRAX collateral ratio should be at any given time. Each AMO also runs a unique automated strategy to earn yield while monitoring $FRAX stability.

AMOs can go as far as minting and burning $FRAX in their strategy in order to maintain the $1 peg. Strategies like facilitating over-collateralized $FRAX loans on platforms like Fraxlend contributes to $FRAX’s backing, and yield generated by AMOs builds the $FRAX collateral reserves.

So although $FRAX’s collateral ratio may be below 100% at any point, the actual amount of free-floating collateral backing $FRAX may be much greater; even to the point of over-collateralization. To say the least, AMOs add an impressive new degree of capital efficiency to $FRAX, creating a major backstop around its peg and collateral reserves while generating tons of revenue for the protocol.

Curve AMO

This AMO deploys collateral and $FRAX to the FRAX3CRV metapool on Curve Finance, which it controls. This creates deeper liquidity for $FRAX while the protocol also earns trading fees and $CRV emissions. Frax perpetually max-locks all of its $CRV rewards as veCRV, and then votes in favor of the FRAX3CRV rewards gauge.

As $FRAX is traded and the balance of the Curve liquidity pool fluctuates, the Curve AMO mints and burns $FRAX liquidity in response. The AMO maintains a tight balance on the FRAX3CRV pool ratio by supplying and withdrawing liquidity, and $FRAX sees less peg volatility as a result.

Uni v3 AMO

Similar to the Curve AMO, the Uni v3 AMO manages liquidity positions on Uniswap with collateral and $FRAX. It manages both of these assets in 50/50 Uniswap pools in order to earn trading fees, deepen liquidity for $FRAX, and ultimately contribute to a stronger peg.

Collateral AMO

This AMO lends collateral on platforms like Aave, Compound, etc. to earn yield paid by borrowers. The Collateral AMO follows the same stability mechanism as any other AMO, and rebalances the amount of collateral deployed on these markets depending on Frax’s collateral ratio.

Lending AMOs

Lending AMOs lend $FRAX externally on protocols like Compound or internally on Fraxlend to earn yield and expand the $FRAX market. As borrowers over-collateralize $FRAX on these platforms, the AMO can perpetually supply lending markets with newly minted $FRAX. This essentially creates a gateway for other $FRAX collateral types, since using collateral on these lending platforms to borrow $FRAX is what triggers the AMO to lend more newly minted $FRAX.

Lending AMOs are also used to control $FRAX interest rates across these money markets. They can mint and supply new $FRAX to lower the cost to borrow it, or it can withdraw and burn supplied $FRAX to reduce supply on these markets and raise borrow rates.

How Does it Work? Fraxswap

Fraxswap is an integrated AMM that uses a custom design known as a Time-Weighted Average Market Maker (TWAMM). In short, the TWAMM model is super efficient for filling large orders over long spans of time.

The idea is inspired by TWAP order execution, while the TWAMM concept itself originated from Paradigm. The core AMM is Uniswap v2’s constant product formula, however orders can be broken apart into small, equal “sub-orders” that are submitted to the AMM over a certain time period.

Fraxswap TWAMM interface

Fraxswap is a useful tool for anyone, DAO or individual, looking to slowly average out of one position and slowly average into another. Whether it be deploying stablecoins or vice versa, the TWAMM is beneficial for gradual accumulation or sale of large amounts of any asset.

How Does it Work? Fraxlend

Fraxlend is a borrowing and lending platform where anyone can create their own lending pool for any two assets. As long as both of a pool’s assets have a Chainlink price feed, anyone can create a market for borrowing one asset against the other.

As such, Fraxlend hosts this growing set of debt markets that people are creating. It provides the framework for every pool, such as safe loan-to-value ratios (LTV) and appropriate interest rates for borrowers. Permissionless pool creation will not be available until Fraxlend’s code is fully audited, so any existing pairs are created by the developers.

Each Fraxlend pool has a token that lenders deposit (Asset Token), and a token that borrowers deposit (Collateral Token) to take out loans of the Asset Token. The amount that borrowers can take out against their collateral is determined by the pool’s maximum loan-to-value ratio (LTV).

Fraxlend UI and available pairs

The standard maximum LTV is 75%, so a borrower can only take out up to 75% of their collateral value. They are liquidated if their value of their debt rises above 75% of their collateral value. In the event the protocol accrues bad debt, the loss is socialized amongst all lenders rather than it being the burden of the last lender(s) to exit the pool.

Fraxlend can even facilitate under-collateralized loans for institutional borrowers, where a pool’s max LTV is over 100%. In this, borrowers can take out more than 100% of their collateral value. While anyone can lend to these pools, borrowers must be whitelisted as reputable and known to repay their loans in order to mitigate default risk.

How Does it Work? frxETH

frxETH is Frax’s $ETH liquid staking product. The frxETH token is basically a stablecoin pegged to $ETH. Every frxETH minted requires 1 $ETH to be deposited, and 1 frxETH can always be redeemed for 1 $ETH.

Unlike $ETH derivatives that use mechanisms like rebasing, frxETH will instead leverage a dual token system with frxETH and staked frxETH (sfrxETH). frxETH must be staked as sfrxETH to earn staking yield.

frxETH growth since inception (https://facts.frax.finance/frxeth)

Behind the scenes, the frxETHMinter contract is what takes $ETH deposits and mints frxETH. Frax has a growing set of whitelisted $ETH validators which use the $ETH from the frxETHMinter to set up in-house validator nodes.

The cost of an $ETH validator node is 32 $ETH. So, every 32 $ETH the frxETHMinter contract collects is used to set up a new node using the credentials of the next-in-line frxETH validator. The $ETH staking rewards these validators earn is used to mint frxETH and send it to the sfrxETH contract.

As the sfrxETH contract balance accrues more frxETH from these staking rewards, the amount of frxETH redeemable by sfrxETH stakers increases over time. The frxETH product is a newer release, and Frax could be looking to seriously compete against other liquid staking platforms by leveraging its substantial veCRV reserves to direct emissions. It has already attracted over $50 million TVL since its launch just 3 months ago.

How Does it Work? Frax Price Index

The Frax Price Index is a stablecoin that retains its purchasing power against inflation. $FPI keeps peg using its own AMOs to trend with the U.S. Consumer Price Index.

FPI Stats dashboard (https://app.frax.finance/fpifpis/fpi-stats)

Chainlink oracles supply $FPI AMOs with updated 12-month unadjusted CPI rates. $FPI AMOs adjust the redemption rate accordingly as inflation rises (or in rarer cases, falls). With this dynamic, $FPI essentially follows the same stability mechanism as $FRAX.

However, $FPI can never be partially-backed like $FRAX. Its AMOs keep its collateral ratio constant at 100%. To keep up with inflation, the value of $FPI collateral has to rise with it in order to maintain this 100% CR. If AMO strategies cannot generate yield at an equivalent rate to inflation (and therefore, unable to keep a 100% CR), then $FRAX collateral is purchased with $FPIS tokens via Fraxswap’s TWAMM.

$FPIS captures value from $FPI in the same way $FXS captures value from $FRAX. If $FPI AMOs are earning yield at a rate higher than current inflation rates, this excess yield is passed back to $FPIS lockers (veFPIS).

Partnerships

Frax has established some impressive partnerships throughout the DeFi ecosphere. Most notably is its partnership with Convex Finance, which is a yield optimizer for governance tokens like $CRV and $FXS. This partnership created the ability for $FXS holders to stake on Convex for cvxFXS (a liquid max-locked $FXS derivative).

GMX, the largest onchain perpetuals exchange by revenue, also has an established partnership with Frax. $FRAX makes up 2% of the GLP Index, so GMX effectively sources $FRAX liquidity to partly facilitate its trading volume. Sperax, an Arbitrum-native protocol that offers “auto-yield” on its $USDs stablecoin, recently announced it would leverage Fraxlend in its newly added $USDs yield strategy.

Wombat Exchange has partnered with Frax to begin natively issuing $FRAX on BNB Chain (formerly BSC). As a partner of Mai Finance, $FXS can be used as collateral to mint the $MAI stablecoin at 0% interest on any chain that Mai is live on, while $MAI can be used to mint $FRAX natively on Polygon. Frax also has a presence in the Cosmos IBC universe, and is working with Evmos to issue $FRAX natively for Cosmonauts.

Just recently, the launch of $clevUSD by Clever Finance laid the groundwork for a new synergy between Frax, Clever, and Concentrator. An established Frax partnership from September would see Clever take advantage of Concentrator vaults in order to offer leveraged yield farming on select $FRAX LPs. $clevUSD now makes it possible to run these strategies, and creates safe, competitive yield for $FRAX.

Tokenomics

$FXS Price: $5.43

Market Capitalization: $392,427,773

Circulating Supply: 72,277,813

Total Supply: 99,822,984

Fully Diluted Valuation: $541,982,518

$FRAX Price: $1.00

Market Capitalization: $1,023,027,133

Circulating Supply: 1,023,027,133

Learn more about token distribution here.

The utility of $FXS and how it supports the protocol

$FXS is Frax’s governance token for proposing or voting on new changes to the protocol. Based on the veToken model inspired by Curve Finance, $FXS can be locked as veFXS. Locked $FXS is used for voting, boosting rewards, and capturing value from the protocol such as fees, excess collateral burned, and yield generated by $FRAX AMOs.

The $FXS token must be locked to enjoy these benefits, and lock duration determines how much veFXS (and corresponding rewards) is received. $FXS can be locked for up to four years, which yields 4x the veFXS voting power (100 $FXS >> 400 veFXS). This balance gradually falls back to 1:1 up until the $FXS unlocks.

veFXS holders earn a portion of all fees generated from Frax’s diverse suite of products. Any excess collateral that accumulates within the protocol is used to buy $FXS which is then distributed entirely to veFXS holders (FXS1559).

Like veCRV, veFXS also controls Fraxswap gauge weights, so voters decide which pools get how many $FXS rewards for LPs. Similarly, liquidity providers can lock $FXS to receive up to a 2x boost on their $FXS pool rewards.

Conclusion

Frax is constantly emerging at the top of the DeFi ecosphere as it regularly pushes new product additions and improvements to the protocol. It has extended its reach to nearly all corners of DeFi whether it be AMO deployments, the Curve Wars, or simply its multichain presense.

The protocol has shown no signs of slowing in its ambitions, bringing seriously innovative products to the forefront as it continues to scale. All in all, the future looks bright for Frax, and there is no doubt that DeFi will benefit from its continued progress.


Follow me on Twitter

Come join the Galaxy Box

Follow Frax on Twitter

Join the Frax Finance Telegram

DISCLOSURE: I hold $FXS (<5% of my portfolio). I was not asked to write this article and have not been compensated in any way. The information provided in this article is solely for educational purposes and should not be considered as financial advice. The views expressed in this article are my own and do not necessarily reflect the official policy or position of any company or organization. Readers should always conduct their own research before making any financial decisions.