Systems: Frax Analysis

Systems: Frax Analysis

Nov 14th, 2022
This post is the first part of a 2-part perspective on the Frax protocol in Web3, completed jointly with Justin Cullen and Dino Mihalopoulos. The top-level TL;DR is that we study Frax, a DeFi protocol built around an algorithmic stablecoin, from a systems thinking perspective.
We start by analyzing the Frax system itself (this part) and then go on in Part 2 to synthesize Frax within the broader system - DeFi banking. Comments, questions, and claims of “you’re wrong” can be sent to any of my inboxes.

Analysis

TL;DR: We dive into Frax, a DeFi protocol built around an algorithmic stablecoin, and take apart its components to understand how it works as a system. For each of those components, we gauge what purpose it serves and why it exists, as well as how they functionally connect.
We were asked for a succinct three line summary. Voila:
  1. Frax is not what everything thinks it is; today’s Frax relies on their curve/convex exposure and not their original algorithmic stablecoin/equitycoin setup.
  1. It has rebuilt much of the important legos in DeFi, which is impressive on the one hand because of their product velocity, but on the other hand leads to a question of why would customers pick them over competitors for <waves hands> any of these legos when they’re so interchangeable?
  1. What they’re very good at is creating interesting game theoretic situations (fairly) manipulating Convex and Curve gauge voting in their favor, so much so that they’re somewhat propping up those two protocols as well vis a vis bribing.
 

 
We understand the Frax system by taking it apart. For each constituent part, we then repeat the process and take those apart. Graphically, the following diagram completely describes Frax today. Below, we examine the different flows through the system, then split into subsystems and consider each independently. Before we dive in, note that we refer to the entire system as Frax and the associated stablecoin as FRAX.

Top level.

The top level system for Frax includes:
  • The Core Frax V1: FRAX stablecoin, FXS equitycoin, and the arbitrage mechanism for keeping FRAX pegged to the US dollar.
  • Algorithmic Market Operators (AMOs): A set of smart contracts and operations that abstract the role that the original mechanism played in order to allow for other mechanisms to simultaneously keep the peg and earn yield on FRAX.
  • FraxSwap: A permissionless constant product AMM with an embedded time-weight average market maker (TWAMM) to conduct large trades over time trustlessly.
  • FraxLend: A platform for creating isolated, permission-less lending markets between any two ERC20 tokens with an available Chainlink data feed.
  • FraxBridge: A mechanism for allowing FRAX/FXS to be bridged onto other chains and then allowing for swaps with the canonical equivalents on that chain. This is a safety mechanism so that Frax devs can turn off bridging as necessary.
  • Governance: The system for snapshot voting and ensuring that the protocol does what the wider user base wants. Conversation largely operates through Discourse and Telegram, with the voting base tied to voter-escrowed FSX (veFXS) holdings.
  • Gauges: Incentivized yield farming contracts that accept deposits in some asset and provide yield in FXS. Gauges incentivize strategies or strengthen partnerships beneficial for the protocol. Examples are increasing liquidity or encouraging asset lending.
  • Frax Web UI: The UI through which the public interacts with the contracts.
  • FPI, or Frax Price Index: Frax’s second stablecoin and built on top of the FRAX foundation. FPI is inflation-resistant and maintains its peg to a real world basket of goods. In other words, it is a stablecoin that keeps up with inflation.
  • Frax ETH: Frax’s new Ethereum liquid staking system competing with Lido and Rocket Pool. It has an interesting mechanism involving two coins that are meant to ultimately provide better returns to liquid stakers through Curve emission incentives, with a twist.

The Core Frax V1 subsystem.

Most people think of Frax as its V1 subsystem, which has been supplanted by V2 starting in March 2021 and culminating in May 2021. This subsystem still exists, as all on-chain remnants do, but its mechanism has been turned off to the public by the operating team in favor of the V2 approach. Its pieces continue to serve valuable functions.
The Frax V1 subsystem primarily consisted of FRAX, FXS, and the Frax Pool, visually described in the graphic above. FRAX is a stablecoin and is meant to trade at parity with one dollar. FXS is its algorithmic stablecoin twin and was designed to a) serve as governance token for Frax and b) soak up the volatility of FRAX. Notably, FRAX had a contract-enforced Collateral Ratio as well.
FXS’s primary goal was to keep FRAX token pegged to the dollar, and it did this by following what is by now a well understood approach in Web3:
  • If the price of FRAX exceeded $1, the contract can auction off new FRAX for some amount of USDC and FXS until the price returns to the target. It then burned the FXS.
  • If the price of FRAX dropped below $1, the contract can buy back FRAX by issuing new FXS as well as USDC from its vault until the price returned to the target.
What relative quantity of USDC and FXS should the contract transact? That was determined by the Collateral Ratio. If the Collateral Ratio was 0.8, then $0.80 USDC and $0.20 FXS was needed to transact with $1 of FRAX. In this way, the Collateral Ratio was preserved while arbitrageurs kept FRAX pegged to the $1. What determined the Collateral Ratio? A PID controller that operates on the perceived growth ratio of total amount of FRAX market liquidity divided by the FRAX market cap. When the growth ratio goes up, the Collateral Ratio goes down, and vice versa.
The price of FXS then followed from the expectation of future value in the Frax ecosystem. This was originally from the expected demand for FRAX, which would necessitate burning FXS to issue.
Chart from Vitalik Buterin’s post on Stablecoins: https://vitalik.eth.limo/general/2022/05/25/stable.html
Chart from Vitalik Buterin’s post on Stablecoins: https://vitalik.eth.limo/general/2022/05/25/stable.html
Today, FRAX is kept pegged by AMO operations. How do we know this? First, the following chart shows that the FXS supply isn’t changing and there aren’t any burns happening. There would need to be in order for the arbitrage arm to work.
To hit that home, the access control variables governing this are all set to disable redeeming. We see in the FRAX token that collateral_ratio_paused = True, which means that any calls to refreshCollateralRatio() will revert when called by the public. And we see in the FraxPoolV1 that mintPaused, redeemPaused, recollaterizePaused, buybackPaused, and collateralPricePaused are all set to False. The FraxPoolV1 variables have been off to the public since this transaction on August 23, 2021, while the collateral ratio is default paused and has been for much longer. The updates to the Collateral Ratio on their public dashboard happen at the core Frax team’s behest. They unpause the collateral ratio with toggleCollateralRatio() , refresh it, then pause it again. This always increments the global collateral ratio because the price target is set to $2 and has been since this transaction on February 3rd, 2022. Further, as far as we can tell, the global collateral ratio doesn’t actually do anything material. We describe this finding further below.
Regardless of whether the displayed global collateral ratio is material anymore for Frax, the peg is today kept not by users and markets arbitraging through principled mechanism, but instead, it is held by the market doing the work knowing that the price will be kept pegged by the core team if it doesn’t do that work. Occasionally, they make sure that it is in order to keep the confidence. How?
Say the price of FRAX is greater than $1 by a material amount. This signals that the market has more demand for FRAX than what is there, so we want to deploy more FRAX to the market. We do this by having the AMOs purchase FXS on the open market with FRAX, then send that FXS to veFXS holders. This flow calls swapBurn(...) in the FXS1559_AMO_V3 contract from a governance contract (Frax1.eth). Here’s an example transaction. This then sells FRAX into the open market for FXS by appealing to the Uniswap Router. If burn_fraction is > 0, we then burn that percent of the received FXS. However, that is set to 0, so all of the received FXS is distributed to veFXS holders via the veFXSYieldDistributorV4.
On the other hand, say the price of FRAX is less than $1 by a material amount. Then we want to burn FRAX. We call FraxAMOMinter.burnFrax(amount) from a governance contract. An example transaction is here. Here, the flow is to call the FXS1559_AMO_V3 contract’s burnFrax(frax_amount). This then induces FraxAMOMinter’s burnFraxFromAmo(frax_amount). This can only be called by a valid AMO, which includes the FXS1559 AMO, the bridge AMOs, the TWAMM, FraxLend, Aave, ManualTokenTrackerAMO, MSIGHelper, and the Uniswap V3 Liquidity AMO V2.
The FraxAMOMinter then calls FRAX token to execute pool_burn_from(FraxAMOMinter, frax_amount), updates the minted FRAX balances and sum, and calls syncDollarBalances() , which is responsible for maintaining the requisite collateral numbers. It does this by iterating through the list of AMOs and getting the stored amount of FRAX and Collateral for each AMO. It then accumulates those values and stores them as fraxDollarBalanceStored and collatDollarBalanceStored.
As alluded to above, nothing here materially uses the Collateral Ratio anymore. There is a disconnect between the fixed global_collateral_ratio in the FRAX contract and the actual collateral ratio used. Up above, when swapBurn was called, if is_override is false, then the amount to be burned is computed from pool.buybackAvailableCollat(). That uses the global_collateral_ratio to compute the required collateral and returns the difference between held collateral and required collateral. However, in all the recent swapBurn calls (e.g. this one), is_override is true, bypassing this and minting whatever amount of FRAX the team specifies. The AMO minter contract does have a min_cr it checks, but it's irrelevant because it's set to 78%.
The Frax Pool is where the protocol kept its operations for the different flavors of minting and redeeming FRAX in Frax V1, as well as operations for recollateralizing and buying back FXS. Along with the core mechanism, it doesn’t appear to be publicly usable anymore given that its gating variables all gate.
Altogether, this implies that:
  • FXS no longer serves an arbitraging function, and so its second purpose of “b) soaking up the volatility of FRAX” is moot. However, the value of FXS still follows from the expectation of future value in the Frax ecosystem. This is because when FXS is voter escrowed and becomes veFXS, it a) acts as a governance token and c) it becomes the recipient of cash flow for all of the revenue generating functions in the Frax ecosystem.
  • The global collateral ratio listed on the website (displayed below) doesn’t appear to do anything. We’d love to be wrong about this, but as far as we can tell, it just maintains Frax’s image now. Additionally, the team controls this completely by keeping it gated and then briefly ungating it to update the ratio. The true global collateral ratio (currently 88.3%) is what’s shown on Frax Stats.
  • None of the redeeming functions are available through the Frax protocol. The website says that users can’t do this because the price is within the price band. Even so, it’s just disabled. To redeem Frax, users have to do it through the Curve pools.
💡
It would be fantastic to get the team’s comments on this and clear up any confusion or misunderstanding we may have. This remains an open invite to do so. We do not think any of the above is nefarious. Frax has always stated that they control their global collateral ratio with an offline PID controller. However, the update function is very clearly not available to the public even though the contract was written in a way that it could be. Disabling redeeming also isn’t nefarious given that they want the world to use the Frax protocol differently than how it was originally designed and very few groups were ever using that mechanism anyways. What is strange though is that there is nothing ever discussed about this. The docs still suggest that the displayed collateral ratio is meaningful and that people can redeem FRAX through the Core V1 mechanism. We’ve hung out in the Telegram channel enough to know that the team never talks about this either, and it appears from side conversations that close followers aren’t aware of this either.
Frax Collateral Ratio since debut. The nadir was ~81%. Note how it sharply increased after the Luna collapse in May 2022. This value is controlled by the protocol team only.
Frax Collateral Ratio since debut. The nadir was ~81%. Note how it sharply increased after the Luna collapse in May 2022. This value is controlled by the protocol team only.
Again, we would love to be wrong about the global_collateral_ratio being moot today. Assuming we are not, why would Frax care about doing this for its image? As seen in the above chart, the Collateral Ratio moved sharply down shortly after debuting as the protocol grew a lot relative to its small market cap. This was great because they could say that the market was signaling confidence, a theme that was then picked up throughout Web3. And in a way it was if the underlying PID controller was responding to higher growth of FRAX usage.
It stabilized in the .82-.88 range and then sharply increased after the Luna collapse in May 2022. Again, this would be great if it actually was responding to the market saying “woah back up I don’t know about these algorithmic stablecoins now.” Regardless of if that’s true, Frax has made it a point to increase its Collateral Ratio to at least 1 and likely more. One reason for doing this is so that the protocol appears less brittle.
💡
Another is to stave off regulatory scrutiny, which is perceived as a priority for the SEC following the Luna crash and the concerns around USDT.
More broadly though, observe that the Collateral Ratio as proposed is supposed to play a comparable role to that of interest rates. In DAI, the Collateral Ratio is pegged at 1.50, and it is the interest rate lever that moves up and down in order to manage the stability. This is how traditional finance works as well. Organizations, including the Federal Reserve Bank, will generally leave Collateral Ratios fixed and adjust interest rates to manage lending and risk taking.
When we have a Collateral Ratio <1, we are insinuating that capital needs to be injected into the system in some way in order to make up the difference; it can’t be made from nothing. Another interpretation is that we are somewhere taking in a loan of capital and giving a rate of return on that loan. We are implicitly describing lending with a positive interest rate. We don’t expand on this here, but an interesting question is whether it’s better to have levers for manipulating the Collateral Ratio or the Interest Rate. This is a key difference between DAI and Frax V1.

All together, the Core V1 algorithm was the following:
  1. Decollateralize: Lower the Collateral Ratio by 0.25% every timestep T if FRAX > $1. In practice, T is at most once an hour and is called manually.
  1. Equilibrium: Don’t change the Collateral Ratio if FRAX = $1.
  1. Recollateralize: Increase the Collateral Ratio by some 0.25% every timestep T if FRAX < $1. In practice, T is at most once an hour and is called manually.
  1. Value Accrual: Burn FXS with minted unbacked FRAX, extra collateral, and fees.
The price of FRAX, FXS, and the collateral are all calculated with a time-weighted average of the Uniswap pair price and the ETH:USD Chainlink oracle. The latter allows a true price of USD instead of the average of Uniswap pools.
Abstractly, it’s a banking algorithm that adjusts balance sheet ratio based on market’s pricing of FRAX, where the Collateral Ratio is the ratio of capital (collateral) over liabilities (FRAX). The market “votes” on what this should be.
💡
Chesterton’s Fences?
  • FRAX is core to the system, as it’s the stablecoin that acts as the US Dollar equivalent and from which everything else flows.
  • FXS was especially core to the system in V1 because it kept FRAX pegged. Today, it acts as a recipient of all of the cash flows as well as governance voting, a centralizing feature that makes Frax more attractive than it would be if the revenue flowed to many disparate sources.
  • The Collateral Ratio is core to the system working the way it does. Its mechanism and its continued importance means that Frax makes certain decisions that it wouldn’t make otherwise, like for example pushing for this value to become at least 100% in order to escape upcoming regulator scrutiny.
  • The Frax Pool was necessary in so far as there needed to be a place to store the functions and coins. Unlike the above three, it no longer serves a purpose in the post Core V1 world.

The Algorithmic Market Operator (AMO) subsystem.

Frax V2 introduced the AMO Controller, an autonomous contract that enacts arbitrary monetary policy. Each AMO is constrained by being unable to change the FRAX price from the $1 peg outside of a very narrow band. They are birthed with a set of functions that run market operations algorithmically. Further, they are given an allotment of FRAX that can be later adjusted. They cannot mint FRAX out of thin air, as that would frequently break the peg.
The insight behind Frax V2 was that the base stability mechanism from Frax V1 can be abstracted as the following:
  1. Decollateralize: A strategy that lowers the Collateral Ratio.
  1. Market Operations: The equilibrium strategy, doesn’t change the Collateral Ratio.
  1. Recollateralize: A strategy that increases the Collateral Ratio.
  1. FXS1159: A formalized accounting of the AMO balance sheet that defines how much FXS can be burned with profits above the target Collateral Ratio. This was changed after a governance vote to not burn the accrued FXS, but instead send that amount to the veFXS contract, which then passed on 100% of protocol profits to veFXS holders.
These originally were posted about in March 2021 and were meant to be a complete mechanism that anyone could propose, build, and create. As long as they adhered to the above specifications and governance concurred with their being representative as well as how much to fund them, they could go live on the Frax ecosystem.
Every AMO, at every timestep T, calculates excess value above its Collateral Ratio and mints FRAX in proportion to the Collateral Ratio against that value. It then uses this currency to purchase FXS on FRAX-FXS AMM pairs and sends that to the veFXS contract.
Most of the AMOs earn some sort of yield, exemplified by the Curve AMO. That yield increases the Collateral Ratio because of the surplus value V. It can then use V to purchase FXS from AMMs or, potentially more efficiently, mint (V / Collateral Ratio) FRAX and use that to purchase FXS from the most liquid on-chain market for FRAX/FXS before then sending the FXS to veFXS holders. This approach is better because it a) expands the FRAX supply, b) accrues value to the FXS token holders, and c) rebalances the protocol to the Collateral Ratio.
Below is an incomplete list of live AMOs, along with a description of how their abstraction works.
Notably, the Frax Lending AMO reinvents the core mechanism underlying MakerDAO’s DAI. First, it mints FRAX into money markets (Compound, CREAM) to allow anyone to borrow FRAX by paying interest instead of the base minting mechanism. This minted FRAX doesn’t enter circulation unless over-collateralized by a borrower through the money market so that the AMO doesn’t lower the Collateral Ratio. This then allows the protocol to directly lend FRAX and earn interest from borrowers through existing money markets.
In other words, it’s MakerDAO’s protocol in a single market operation contract. The cash flow from lending can buy back and burn FXS, which is similar to MakerDAO burning MKR from stability fees. This gets FRAX into circulation by paying market interest rates. That interest rate to borrow FRAX can be increased or decreased by minting more FRAX (lower the rate) or removing FRAX and burning it (increase rate), changing the cost of borrowing FRAX. Further, the AMO can mint and remove FRAX to target a specific rate.
Looking forward, we show an incomplete list of AMOs that have been approved by Governance but are not yet in operation:
💡
Chesterton’s Fences?
  • The FraxAMOMinter and FXS1559_AMO_V3 are contracts integral to the system.
  • So is FRAX itself, which serves as Frax’s lever for moving up and down the interest
  • Any one AMO is not integral to the system as they mostly operate independently.

The FraxSwap subsystem.

FraxSwap is a constant product AMM with core functionality based on Uniswap V2. It differentiates itself from other AMMs by being the first AMM to include a time-weighted average market maker (TWAMM) to facilitate executing large trades trustlessly over time. Fraxswap’s TWAMM features are based on Paradigm’s 2021 whitepaper introducing the concept. Long term trades are executed by conceptually splitting orders into “infinitely many infinitely small virtual sub-orders”, and using a closed form formula to calculate the effect at a given point in time as needed to limit gas costs.
Diagram of a trade on a Fraxswap pair with a TWAMM order active. Source: Frax Docs
Diagram of a trade on a Fraxswap pair with a TWAMM order active. Source: Frax Docs
TWAMM features were the primary motivation for the development of Fraxswap. They allow the Frax protocol to execute large long term orders and enact monetary policy changes sans the disruptive effects of large immediate trades or manually executing over a long time. Frax uses TWAMM long term orders for protocol operations such as:
  • Buybacks and burning of FXS/FPIS with AMO profits.
  • Trading newly minted FXS/FPIS to stabilize the peg price of FRAX/FPI.
  • Minting FRAX to purchase hard assets through seigniorage.
Fraxswap TWAMMs are a generally useful and available feature that will likely continue to find more uses cases in Frax itself, but also in external protocols who have similar needs in smoothly executing large trades over time.

The FraxBridge subsystem

The Frax ecosystem is multi-chain and consequently needs a way to work in every Web3 jurisdiction without running into weird arbitrage issues. Frax handles this by having one source of truth for almost everything related to the Collateral Ratio and other globals - the Mainnet FRAX contract. However, it also doesn’t seem to have any action happening on non-Mainnet AMOs. We checked those on Fantom, Polygon, Optimism and Arbitrum, and noted there hasn’t been a transaction in almost a year.
When a user bridges FRAX, it’s tagged with an identifier. When bridging with Anyswap, it becomes anyFRAX; with Wormhole it becomes wormFRAX; and so on.
Each chain also has one canonical FRAX and FXS. These are what the AMOs use and from which users can trustlessly mint/redeem. These canonical tokens have a 1:1 stableswap AMM built in which allows swapping to/from the canonical FRAX/FXS of the network to a bridged FRAX/FXS. Swaps can be done any time at the Crosschain Web UI or interacting directly with the native token's smart contract on any chain.
When a hack happens on a chain, the team can shut off the bridging mechanism and provide other means for users to get their money out. This is what happened recently with Fantom and thus was birthed the Fantom FraxFerry.
💡
Chesterton’s Fences?
  • The CrossChain Swap UI is not integral, as can be seen in the FraxFerry controversy, but does make the system more tenable for users.
  • The tagging mechanism is integral to making this work.
  • Each tagged coin is important.

The FraxLend subsystem.

Launched in September 2022, Fraxlend is a platform for creating isolated, permission-less lending markets between any two ERC20 tokens with an available Chainlink data feed. New pairs are created through the deploy function exposed on the FraxlendPairDeployer contract. Each pair consists of an asset token that are provided by lenders in exchange for fTokens, as well as collateral tokens which are provided by borrowers prior to borrowing asset tokens. The fTokens represent a share of the supplied asset pool and can later be exchanged by lenders for their supplied asset tokens plus accrued interest.
The FraxLend system diagram sourced from the Frax docs.
The FraxLend system diagram sourced from the Frax docs.
Borrowed tokens accrue interest over time, with variable interest rates calculated according to the method chosen at creation time of the pair. Currently, their are two available rate calculators:
  • Time-Weighted Variable Rate Calculator. Adjusts the interest rate up or down over time based on whether utilization (borrowed assets / supplied assets) is above or below a specified target range. This functions similar to how the CR is adjusted in the core protocol peg stability mechanism.
  • Linear Rate Calculator. Interest rate is computed purely as a function of utilization.
In addition to standard over-collateralized lending markets available on other platforms such as Aave and Compound, Fraxlend also supports creating lending markets with custom term sheets for OTC debt structuring via the deployCustom function of the deployer contract. This function requires explicit whitelisting to use, but allows specifying things like maturity dates, under-collateralized loans, and restrictions on who may borrow and lend.
Prior to Fraxlend, Frax already had existing AMOs that minted FRAX into external lending markets such as Aave. The introduction of Fraxlend as a protocol-owned lending market paved the way for a new Fraxlend AMO via FIP109. This AMO can more efficiently mint FRAX to lend via Fraxlend pairs without reducing the Collateral Ratio due to the over-collateralized nature of borrows. The isolated nature of Fraxlend pairs adds additional safety features here and allows governance the ability to more explicitly manage risk when deciding to which pairs the AMO should provide assets.
Fraxlend usage rose significantly in mid October 2022, with approximately $15m worth of FRAX supplied for lending, almost $5M in FRAX borrows, and $11M posted as collateral cumulatively across the currently supported tokens (CRV, WETH, WBTC, CVX, and FXS as of Oct 31, 2022).
FraxLend usage with respect to Supply, sourced from Frax Facts.
FraxLend usage with respect to Supply, sourced from Frax Facts.
FraxLend usage with respect to Demand, sourced from Frax Facts.
FraxLend usage with respect to Demand, sourced from Frax Facts.
The CRV-FRAX pair currently accounts for more than half of the borrowing on the platform, with about $3.5M of the $4.75M total FRAX borrowed being borrowed against CRV collateral.
The available pairs of on FraxLend as of early November 2022, sourced from Frax FraxLend.
The available pairs of on FraxLend as of early November 2022, sourced from Frax FraxLend.
💡
Chesterton’s fences
  • In house lending market limits exposure to risks on external platforms.
  • Fraxlend AMO can (more) safely mint FRAX for lending, facilitating reduced rates and increased circulation / adoption of FRAX.
  • Isolated lending markets help manage risk between different pairs.
  • Fraxlend is a useful money lego that other protocols can build on, increasing buy-in to the Frax ecosystem.
  • Loans denominated in FRAX generally benefits the Frax ecosystem, since people need to either hold or acquire it in order to pay back debt.

The Governance, Gauges, and veFXS subsystem(s).

This section contains subparts that apply across Frax. It is difficult to separate these units given how interrelated they are.

veFXS: Vote-Escrowed FXS

In addition to it’s role in the operation of the core Frax protocol, FXS also serves as the governance token for the Frax ecosystem via a vote-escrow model similar to Curve. Owners can lock up their FXS for a variable amount of time (up to four years) and receive veFXS in return. The amount of veFXS is determined by the amount of FXS locked up and a multiplier that increases linearly with longer lock duration. Locking one FXS for the maximum of four years yields four veFXS that will slowly decrease over time to one veFXS as the remaining lock time approaches zero. A veFXS balance increases by either increasing the lock-up period or by locking up additional FXS at the current lock duration; It isn’t possible to have multiple sets of FXS locked for different times on a single account, nor is it possible to directly delegate veFXS voting power to another account (unlike vlCVX).
The veFXS tokens, not FXS, are the unit of account that determines protocol stake. The vote-escrow mechanism provides more influence to those willing to commit to a long FXS lock-up. Similar to veCRV, only normal EOA accounts are able to stake FXS for veFXS without an explicit whitelisting governance proposal.
Holding veFXS grants a user both influence over the direction of the protocol in the form of voting power, as well as a claim on protocol profits and boosted FXS emission yields when yield farming in Frax’s Gauges (see below). In short, holding veFXS grants:
  1. A claim to a portion of protocol generated yield.
  1. Voting rights on protocol governance proposals.
  1. The ability to propose new changes the protocol if above a minimum threshold (currently 1% of the total votes).
  1. The ability to vote on “Gauge weights” that control how FXS emissions are allocated between incentivized yield farms.
  1. Boosted yields for liquidity mining in Gauges with veFXS boosts enabled.
The FRAX protocol earns revenue from protocol fees and AMOs over time. It periodically distributes accrued excess value as yield to veFXS holders via the FXS1559 AMO.
💡
Note: As of 2022-10-25, the FXS1559 documentation is out of date; FXS burning hasn’t been the mechanism used since this proposal passed in Oct 2021.
FXS1559 periodically calculates the amount of excess collateral value beyond what is required by the Collateral Ratio. It then mints enough FRAX to balance the excess collateral, buys FXS on an AMM, and sends the purchased FXS to a yield distributor contract that divides the rewards among veFXS holders according to their overall share. These rewards can be claimed at app.frax.finance/vefxs.
As an example, say the collateral ratio is 90% with a 1M FRAX supply trading at $1, and there is $990M in collateral for a surplus of $90K. FXS1559 can mint $90K / 0.9 = $100K worth of FRAX to convert into FXS yield.

Gauges

Frax “gauges” are incentivized yield farming contracts that accepts deposits in some asset, and provide yield in the FXS + possibly other tokens. Gauges incentivize strategies or strengthen partnerships beneficial for the protocol. Examples are increasing liquidity or encouraging asset lending. The initial token distribution for FXS allocated 60M tokens to be used for community building / liquidity incentive programs. The current emission rate of 25,000 FXS per day is the total amount of rewards accrued daily by all gauges and is set to halve again soon. Each gauge is allocated a fraction of these emissions proportional to their “gauge weight” as determined by veFXS holders voting for gauges they want to receive more rewards. Users are free to reallocate their veFXS every 10 days, and the gauge weights are re-computed once a week.
Many gauge contracts also support one of more types of “boosts”, which increase farmers effective APR if they meet certain criteria.
  • veFXS boosts provide a boost to gauge APR based on the amount of veFXS relative to their stake in the gauge. For example, a particular gauge might offer up to a 2x veFXS Boost for users having at least 4 veFXS per FRAX in an LP position.
  • Timelock boosts provide a boost to APR to stakers willing to lock their stake up in the gauge for a period of time. A longer lock period will typically yield larger APR boost up to a point.
Gauges for different types of deposited assets often display similar boost configurations, depending on what they want to incentivize. See the Frax gauge documentation for examples of the most common types of gauges today and typically boost configurations.

Governance

Governance in FRAX is quite active, since most operations on AMO and Gauge contracts require governance approval. Changes to the FRAX protocol are managed via off-chain voting on snapshot proposals, where 1 veFXS = 1 vote. Although fully decentralized governance via a compound-like “Governor Alpha/Bravo” on-chain voting and a time-lock contract is planned, control of FRAX and it’s assets is currently centralized in a core-team “Comptroller” multi-sig. This requires having trust in the multi-sig owners to act in good faith implementing successful proposals. A more detailed write-up by Blockworks Research on the current state of FRAX governance can be found here.
💡
Chesterton’s Fences?
  • Voting power in governance favors long-term FXS holders due to vote-escrow mechanism.
  • The veFXS incentives reduce the supply of FXS on liquid markets.
  • Gauge weights being determined by veFXS holders helps ensure emissions are used to incentivize strategies beneficial for Frax in the long term.

The Frax Price Index (FPI) subsystem.

The Frax Price Index is a second stablecoin in the Frax ecosystem built on top of the foundation set by the core FRAX stablecoin. FPI aims to be an inflation-resistant unit of account by maintaining a peg with a “real world basket of goods”. In other words, it is a stable asset whose purchasing power keeps pace with inflation. In more concrete terms, the FPI protocol targets a peg price determined by US CPI-U unadjusted 12 month inflation rate as reported by the US government. This information is provided on-chain via a specialized Chainlink oracle that publishes this data immediately after the monthly CPI data is released. Future versions of FPI may migrate to a more decentralized approach to determining the FPI peg target.
The FPI system shares some similarities with the core FRAX stablecoin protocol and uses the following tokens, along with an FPIControllerPool whose API maintains the desired invariants between them.
  • FPI: An inflation-resistant stablecoin pegged to the US CPI. Analogous to FRAX.
  • FPIS: The governance token for FPI. Analogous to FXS. A portion of the yield generated in excess of the inflation rate accrues to FPIS holders.
  • FRAX: Used as the collateral backing FPI.

Minting and Redeeming FPI

The FPIControllerPool contract exposes public functions mintFPI and redeemFPI that allow minting or redeeming FPI at the peg price determined by the CPI oracle, minus a configurable fee (currently set to 3%). The contract also has a configurable safety band around the peg price, which will cause minting or redeeming to fail if the market price of FPI is outside of this range (currently set to 5%). This is intended to protect against oracle bugs and market manipulation.

Peg Stability

Unlike FRAX, FPI does not have a variable collateral ratio than adjusts based on market conditions; FPI aims to always be 100% collateralized by FRAX. As time progresses, due to inflation, the redeemable value of issued FPI tokens will naturally grow and lead to under-collaterallization. Thus, there are two big challenges:
  1. Consistently earn yield on the FRAX collateral at least as high as inflation.
  1. Still maintain the FPI peg if the yield drops below inflation for a short time delta.
For #1, the FPIControllerPool supports a general mechanism for lending/reclaiming FRAX to/from governance whitelisted AMOs via the giveFraxToAMO and receiveFraxFromAMO calls. As of this writing, this feature is not yet being used (based on the zero value of frax_borrowed_sum). Some recent telegram discussions seem to confirm that FPI AMOs are planned, but not yet ready. Where is the yield coming from then? From telegram discussions, this currently comes from the Curve FRAX/FPI pool yield.
What happens if we aren’t able to generate enough yield to match inflation and FPI becomes under-collateralized? We need to mint FRAX to make up the difference. Frax accomplishes this by minting FPIS tokens to sell for the needed FRAX via a governance initiated TWAMM operation. In other words, FPIS holders foot the bill by having their holdings diluted.

FPIS Utility

FPIS is intended to be the governance token of the FPI protocol as well as a claim on surplus value generated by the protocols economic activity. This parallels the role of FXS in the core FRAX protocol. In the previous subsection, we saw that the protocol needs to produce a yield matching or exceeding inflation to maintain the Collateral Ratio. If the protocol generates surplus yield, a portion of this value will accrue to FPIS holders, and FXS holders will also receive a fraction of the value.
FPIS has limited utility today, but there are future plans for that to change. A vote-escrowed version, veFPIS, is in the works, presumably with similar semantics to veFXS. It is reasonable to expect veFPIS governance to have control over yield generation, peg targets, collateral lending, and so forth.
💡
Chesterton’s Fences?
  • A inflation-resistant stablecoin has inherent utility.
  • Backing FPI with FRAX increases demand for FRAX and benefits the whole ecosystem.

The FraxEth subsystem.

In November 2022, Frax launched its own ETH liquid staking system called Frax Ether. It is a competitor to Lido and Rocket Pool that facilitates obtaining staking yield on ETH without the complexity and limitations of running your own validator node and without the concern of being illiquid. Liquid staking derivatives have several advantages over other forms of staking:
  • Circumvents the 32 ETH minimum requirement to run a validator node. You can stake with as much or as little ETH as you want.
  • Avoids the need for technical knowledge necessary to set up and operate a validator node because you don’t actually run the node.
  • The derivative tokens representing staked Ether are liquid, generating yield for users while also leaving them free to use these tokens elsewhere.
The Frax Ether system consists of two primary tokens:
  • Users deposit Eth 1:1 into the frxETHMinter contract and receive frxETH. It is the new ETH (soft) pegged stablecoin in the Frax ecosystem. Frax validators are spawned as additional ETH is submitted to the contract.
  • Users stake frxETH into an ERC-4626 vault contract and receive sfrxETH (staked frxETH). It is the sfrxETH and not the frxETH that gets the yield distribution from the ETH staked into frxETH. The amount of frxETH in the vault increases over time as staking yield is added to it in the form of frxETH, implying that the sfrxETH : frxETH exchange rate increases over time.
Frax Ether system flow. Source: Frax Ether docs.
Frax Ether system flow. Source: Frax Ether docs.
This two token system is a major difference between Frax Ether and its competitors. Neither frxETH nor sfrxETH are rebasing tokens, which is cited as an advantage over Lido’s stETH since existing DeFi protocols don’t easily support rebasing tokens. The frxETH token functions similarly to WETH, except that it is backed by staked ETH instead of simple ETH. Consequently, the peg will be “soft” until the Ethereum Shanghai upgrade allowing withdrawals of staked ETH.
Besides the rebasing, another reason for the two-coin system, and the more material reason, is that Frax can power frxETH with incentives from the Curve gauge voting in order to get people to park ETH in frxETH. A simple view of it is that:
  1. A user can mint ETH for frxETH 1 for 1.
  1. Once a user has frxETH, they have a decision to make. Either stake it for sfrxETH and earn yield on Ethereum staking (like stETH) or deposit frxETH into a frxETH/ETH Curve liquidity pool.
  1. If a user forgoes the staking return and instead LPs in the Curve pool, then the yield they would have earned accumulates to the other holders of sfrxETH, boosting their yield.
In other words, Frax is using its partnership with Curve and Convex to incentivize ETH / frxETH liquidity with FRX, CRV, and CVX rewards just like it does for FRAX-based pools. Additionally, frxETH will have utility within Frax’s ecosystem as the native ETH stablecoin, e.g. frxETH as collateral in FraxLend.
All frxETH minted is backed by real ETH generating yield in Frax’s validator nodes and contributes to yield earned by holders of sfrxETH, whether it is staked or not. As a result, if Frax can provide the unstaked frxETH itself with sufficient utility on its own, or just competitive rates on Curve via the gauge voting, the yield on sfrxETH can grow beyond that of competing platforms and drive market share to Frax Ether.
💡
Chesterton’s Fence
  • Frax gets protocol controlled Ethereum validators to help secure the overall network.
  • Potential for higher ETH liquid staking yields brings more users into the Frax ecosystem.
  • The sfrxEth token is because the system needs a liquid staked token.
  • The frxEth token is because Frax wants an incentive mechanism that they can power with Curve rewards.