Frax Finance (FRAX)

From CryptoWiki

Basics

History

Audits & Exploits

Contract FRAX is extremely active. There is full coverage of deployed contracts in their software function documentation. With a Test to Code ratio of 719%, this protocol has clearly undergone an astonishing amount of testing. In all my time writing reviews, no other protocol has seen so much testing. There are no scripts provided for protocol testing. No report was found. This protocol has not undergone formal verification. Frax has been audited once [by Certik], before launch. 3 major findings were not corrected.

With the comment :

"Frax Finance has been developed with good security in mind, and this protocol's massive $10M bug bounty ensures that every inch of this protocol is measured for cracks - this is the largest amount offered by a protocol we have reviewed. Frax combines this with great oracle documentation, earning them a place among the best. To improve, this protocol might consider elaborating when documenting its testing methodologies. This protocol's architecture is certainly complicated, so users should feel reassured that Frax takes care to ensure there are no clear lines of fracture."

Bugs/Exploits

  • From Blockthreat (13-4-2022):

"Frax patched a vulnerability that could allow massive slippages after it was responsibly disclosed by Daniel Von Fange."

Governance

Admin Keys

"Admin control information was clearly documented at this location. The relevant contracts are not identified. Ownership is clearly indicated in this location. Smart contract change capabilities are not identified. This protocol dose not have a pause control, and this is identified. This protocol's timelock documentation can be found at this location. The timelock is 48 hours."

DAO

Treasury

Token

Launch

Token Distribution

Utility

Other Details

  • Leverages a two-token model to create an algorithmic, partially-collateralized stablecoin.

Stablecoin

  • Has the FRAX stablecoin.

Technology

"At 479 commits, it's clear Frax's development history is as moving as it is inspirational."

Implementations

How it works

"Whenever FRAX trades above $1 the protocol’s collateralization ratio is lowered and its algorithmic mechanics become more pronounced, while this collateralization ratio is increased whenever FRAX trades below $1."

"FRAX maintains its price stability by offloading its volatility to FXS, which is the governance token that also partially collateralizes the system. As long as there is a buyer on the open market for FXS, FRAX should be able to maintain its peg."

"The FRAX model claims to be under-collateralised but rather a more accurate description is that it’s algorithmically collateralised through a two token system. Here’s how it works:

  1. The system starts off being 100% collateral based, which means that in order to mint FRAX you need 1 USDC per FRAX. However, if this is anything below 100% then an equivalent amount of FXS (Frax Shares) need to be deposited. Think of it that rather than depositing 1 USDC you would deposit 0.9 USDC and $0.10 worth of FXS. It’s not really under-collateralized since you still need to deposit at least $1 of value, however it isn’t over-collateralized.
  1. Now, as time goes on, if the price of FRAX is above $1, then the collateral ratio reduces by 0.25% each hour. If the price of FRAX is below $1 then the collateral ratio increases by 0.25% each hour.
  2. The net result is that the system can become something like 90% collateralized meaning only 90% of USDC needs to be deposited and 10% of FXS per FRAX minted.

However, this isn’t what helps FRAX maintain its peg. The crucial part here is that anyone who buys and holds FRAX can redeem it for $1 worth of USDC and/or FXS. This means that the peg can be a lot stronger since arbitragers can buy cheap FRAX if it goes below $1 and redeem it for $1 of real collateral. Similarly if the price of FRAX goes above $1 then arbs can come in and mint 1 FRAX for $1 and then sell it for $1.10 (or whatever the above-peg price is)."

"FRAX is unique; it is the most central bank-like of algorithmic stablecoins I have seen. If you take a real central bank, most of their assets are other sovereign currencies. Similarly, the assets on FRAX’s balance sheet are other stablecoins. In crypto, this might seem like a strange design choice. But also like a true central bank, FRAX is able to adjust its collateralization level according to the demand for its own currency. When there is more demand for FRAX, the system can run looser, and when demand wanes, it can tighten. Like with Seigniorage Shares, the money supply of Frax is elastic. When demand for the FRAX stablecoin increases, the system can expand the money supply beyond the total collateral in the system. But unlike with Seigniorage Shares, FRAX can also tighten monetary policy when market conditions call for discipline.

But perhaps the most interesting element of Frax is its Algorithmic Market Operations (AMOs). Frax allows anyone to propose an AMO strategy via governance (a la Yearn), and if the strategy is good for the Frax ecosystem, it is free to be adopted.

One such AMO involves minting FRAX into a Curve pool to strengthen the peg. (This is essentially like the central bank minting unbacked currency to defend the peg in the market.) Another example might be minting FRAX to lend on Compound to improve its liquidity, and so on. If it is profitable, or accomplishes a socially useful goal, it can be minted just-in-time and funded via an AMO. But if that AMO overreaches and triggers a decrease in confidence in FRAX (as measured by FRAX going below the peg), the AMO can automatically pull back using the same predefined algorithm."

Fees

Upgrades

"Unveiled its V2 system, which involves underpinning the FRAX stablecoin with + zero-coupon bonds."

Staking

Liquidity Mining

  • From Yield Farmer (16-1-2021):

"Has launched a liquidity mining campaign centered around its FXS governance token."

Scaling

Interoperability

Other Details

Oracle Method

"The protocol's oracle source is documented at this location. The contracts dependent are identified. There is relevant software function documentation. This protocol documents front running mitigation techniques. This protocol documents flashloan countermeasures at this location."

Privacy Method

Compliance

Their Projects

Fraxlend

  • Frax Finance is launching Fraxlend, a permissionless lending market that allows anyone to lend or borrow assets with any token that is a part of a Chainlink data feed (6-9-2022):

"First, Fraxlend will enable the protocol to mint new FRAX through the borrowing and lending process. Fraxlend allows the Frax Finance protocol to directly lend FRAX and earn interest through existing money markets. Until now, the only way to do that was by taking out an over-collateralized loan on a lending platform such as Curve. With Fraxlend, the protocol can now do this whole process in-house, which generates an additional cash flow that can be used to “buy back and burn FXS.

The second new application Drake highlighted is the ability to create custom term sheets for protocol-to-protocol deals. Typically, these deals — such as when a DAO wants to send another DAO tokens  — are worked out via Telegram chats and finalized as OTC deals involving multi-sig wallets. Fraxlend lets DAOs set up the deal on chain, automating the process and making it more transparent."

Frax Price Index

  • Inflation-pegged stablecoin. From their docs (8-2022):

"The Frax Price Index (FPI) is the second stablecoin of the Frax Finance ecosystem. FPI is the first stablecoin pegged to a basket of real-world consumer items as defined by the US CPI-U average. The FPI stablecoin is intended to keep its price constant to the price of all items within the CPI basket and thus hold its purchasing power with on-chain stability mechanisms. Like the FRAX stablecoin, all FPI assets and market operations are on-chain and use AMO contracts. The Frax Price Index Share (FPIS) token is the governance token of the system, which is also entitled to seigniorage from the protocol. Excess yield will be directed from the treasury to FPIS holders, similar to the FXS structure. During times in which the FPI treasury does not create enough yield to maintain the increased backing per FPI due to inflation, new FPIS may be minted and sold to increase the treasury. Since the protocol is launched from within the Frax ecosystem, the FPIS token will also direct a variable part of its revenue to FXS holders.

A specialized Chainlink oracle commits this data on-chain immediately after it is publicly released. The oracle's reported inflation rate is then applied to the redemption price of FPI stablecoins in the system contract. This redemption price grows per second on-chain (or declines in rare cases of deflation). The peg calculation rate is updated once every 30 days when bls.gov releases their monthly CPI price data. Thus, the FPI peg tracks the above 12 month inflation rate and pegs to it at all times from the FPI redemption contract. Thus, when buying FPI stablecoins for another asset (such as ETH) the trader is taking the position that CPI purchasing power is growing faster over time than the sold ETH. If selling FPI for ETH, then the trader is taking the position that ETH growth is outpacing the CPI inflation rate of the US Dollar.

At first, the treasury will be comprised solely of $FRAX, but will expand to include other crypto-native assets such as bridged BTC, ETH, and non-crypto consumer goods and services. FPI uses the same type of AMOs as the FRAX stablecoin however it is modeled to keep a 100% collateral ratio (CR) at all times. This means that for the collateral ratio to stay at 100% the protocol balance sheet must be growing at least at the rate of CPI inflation. Thus, AMO strategy contracts must earn a yield proportional to CPI otherwise the CR will decrease to below 100%. During times that AMO yield is under the CPI rate, a TWAMM AMO will sell FPIS tokens for FRAX stablecoins to keep the CR at 100% at all times. The FPIS TWAMMs will be removed when the CR returns to 100%."

Fraxswap

  • From their docs (5-2022):

"Fraxswap is the first constant product automated market maker with an embedded time-weighted average market maker (TWAMM) for conducting large trades over long periods of time trustlessly. It is fully permissionless and the core AMM is based on Uniswap V2. This new AMM helps traders execute large orders efficiently and will be heavily used by the Frax Protocol to increase the stability of the pegs for the FRAX & FPI stablecoins as well as return protocol excess profits to FXS holders through TWAMM purchases. The motivation for building Fraxswap was to create a unique AMM with specialized features for algorithmic stablecoin monetary policy, forward guidance, and large sustained market orders to stabilize the price of one asset by contracting its supply or acquiring a specific collateral over a prolonged period. Specifically, Frax Protocol will use Fraxswap for: buying back and burning FXS with AMO profits, minting new FXS to buy back and burn FRAX stablecoins to stabilize the price peg, minting FRAX to purchase hard assets through seigniorage, and many more market operations in development."

frxETH

"Staking ETH with Frax mints you frxETH which is a liquid token that represents 1:1 of staked ETH. However unlike Lido or Rocket Pool, frxETH is neither rebasing or value accruing. In order to earn yield with frxETH, you will need to stake the frxETH with Frax to receive sfrxETH, which grows in value about 6.63% a year, similar to wstETH, but higher than Lido at 5% and Rocket Pool at 4.4%.

The reason sfrxETH is higher than other ETH LSDs is because frxETH does not need to be staked in the validator nodes, and all the yield from all the frxETH that are not staked is given to sfrxETH. Thus the less frxETH is staked, the higher the APR for sfrxETH.

Additionally, in comparison to competing LSD platforms, FRAX benefits from large quantities of CRV/CVX held in the company's treasury, giving them higher bribing power to earn higher yield on Convex Finance by voting for more incentives to be directed to their frxETH LP tokens. Hence, Frax’s ETH LSD currently provide a larger staking income than competing products on the market while also strengthening the LSD liquidity on Curve.

To earn this higher APR, users will need to provide ETH and frxETH LP on Curve and stake it on Convex to earn the 10% APR yield. Because of this yield is high, there will be some users that will opt for this instead of staking their frxETH into sfrxETH, which results in higher APR for sfrxETH as explained previously. In addition, unlike Lido or Rocket Pool, Frax has their own lend product, which lets them keep the lending money generated by users borrowing against their sfrxETH collateral, growing the Frax treasury.

In terms of fees, Frax takes 10% of the staking rewards and splits it 80% to veFXS holders, and 20% to the insurance pool, with the remaining 90% to sfrxETH holders."

Roadmap

  • Can be found [Insert link here].

Usage

Projects that use or built on it

Competition

Pros and Cons

Pros

Cons

"While the FRAX model does move in the right direction, it still has a few major problems:

  1. Right now FRAX only supports USDC meaning it’s a wrapped for USDC in some ways. FRAX v2 attempts to add volatile currencies through the introduction of FRAX bonds.
  2. FRAX can’t be used effectively for leverage (like MakerDAO or ARCx) since depositors have no guarantee that they’ll receive their exact amount and type of collateral back. This may be okay assuming FRAX aims to be a primary MoE exchange coin. However, like others, the main beneficiaries of the FRAX stablecoin are the FXS holders who will have increasing power to mint FRAX with their FXS.

The last point around early holders is something I think that plagues all algorithmic stablecoins, and that’s the fact that they enrich early holders at the expense of later holders. Ultimately this will hinder their ability for real adoption since the late adopters will become the early adopter’s exit liquidity."

Team, Funding, Partners

Team

"Many team members are public and cross-reference their employment."

Funding

"Frax recently closed a strategic round, which was led by us at Dragonfly Capital, with participation from Electric Capital, Robot Ventures (Robert Leshner & Tarun Chitra), Balaji Srinivasan, and Stani Kulechov."

Partners

(:

Knowledge empowers us all and will help us get closer to the decentralised world we all want to live in!

Making these free wiki pages is fun but takes a lot of effort and time.

If you have enjoyed reading, tips are appreciated :) This will help us to keep expanding this archive of information.

ETH tip address: 0x83460bE5F218b1520B69D702cE60A1DE37dD8E31

Also check out my CoinTr.ee for more of my content.