In simple layman’s terms, stablecoins are crypto assets pegged to the U.S. dollar. This is done to ensure price stabilization in the crypto market. However, recent events due to UST and USDD crashes have created a new fear, and the crypto community is now pondering: Are Stablecoins really stable?As a result, many attempts have been made to construct more scalable and capital-efficient stablecoins. Frax Finance is one such project. In this article, we will get a complete idea of Frax Finance.SummaryFrax Finance is the world’s first fractional-algorithmic stablecoin, where crypto is partially backed by collateral and partially stabilized algorithmically.It is an open-source, permissionless, and entirely on-chain, currently on Ethereum and 12 other chains.FRAX can be minted and redeemed from the system for $1 of value, allowing arbitragers to balance the demand and supply of FRAX in the open market.FRAX can maintain its peg through the expansion and contraction of the supply of the FRAX token. (Similar to Terra/Luna)Frax Shares (FXS) is the governance and utility tokens of the entire Frax ecosystem.Frax Price Index (FPI) is the second stablecoin of the Frax Finance ecosystem. It is also the first stablecoin that is pegged to the US CPI.FPI uses the CPI-U unadjusted 12-month inflation rate reported by the US Federal Government.Frax Price Index Share (FPIS) is the governance token of the Frax Price Index (FPI) stablecoin.Fraxswap is the first constant automated market maker with an embedded time-weighted average market maker (TWAMM) for conducting large trades fruitlessly over a long period of time.Fraxlend is a lending platform that allows anyone to create a market between a pair of ERC-20 tokens.What is Frax Finance?Frax Finance has described itself to be the world’s first fractional-algorithmic stablecoin where crypto is partially backed by collateral and partially stabilized algorithmically. It is an open-source, permissionless, and entirely on-chain, currently on Ethereum and 12 other chains. The end goal of the protocol is to provide highly scalable, decentralized, algorithmic money.Frax ecosystem comprises two stablecoins, i.e., FRAX, which is pegged to the US dollar, and FPI, which is pegged to the US CPI. Frax Finance Economy comprises its two stablecoins, a native AMM known as Fraxswap and a lending facility known as Fraxlend. Frax Share (FXS) is the governance token of the entire Frax ecosystem of smart contracts, which accrues fees, profits earned, and excess collateral value. FPIS is the governance token of the FPI, i.e., Frax Price Index.How does Frax Finance Work?FRAX can be minted and redeemed from the system for $1 of value, allowing arbitragers to balance the demand and supply of FRAX in the open market. To mint new FRAX, a user must place $1 worth of value into the system.So, if we consider USDC as the collateral, then we can say that FRAX is the stablecoin partially collateralized with USDC and algorithmically stabilized by Frax Share (FXS). The Collateral Ratio (CR) of USDC to FXS is adjusted according to the market demand of FRAX. When FRAX is in the 100% collateral phase, all of the value used to mint FRAX is collateral. As the protocol moves into the fractional state, some of the value that enters the system during minting becomes Frax Share (FXS), which is then burned. For example, in a 90% collateral ratio, every FRAX minted requires $0.90 of collateral and burning $0.10 of FXS. Here is a quick illustration that explains the minting and redeeming of Frax.FraxAll FRAX tokens are fungible with one another and entitled to the same proportion of collateral no matter what collateral ratio they were minted at. FRAX can maintain its peg through the expansion and contraction of the supply of the FRAX token.Expansion: If the market price of FRAX is above the price target price of $1, then there is an arbitrage opportunity to mint FRAX with USDC and FXS according to the Collateral Ratio and market and then sell the FRAX. As a result, this increases the supply of FRAX in the market. Here, extra profit is distributed to FXS holders. Also, the protocol will decrease the Collateral Ratio, which reduces the amount of FRAX backed by USDC.Contraction: If the market price of FRAX is below the target price of $1, then there is an arbitrage opportunity to buy FRAX and redeem the FRAX for USDC and newly minted FXS according to the Collateral Ratio. As a result, this reduces the supply of FRAX on the market. Also, the protocol will increase the Collateral Ratio, increasing the amount of FRAX backed by USDC. So, each FRAX must be supported by a higher percentage of collateral, i.e., USDC. This action increases market confidence that Frax can maintain its backing, causing the price to rise.Frax Shares (FXS) is the governance and utility token of the entire Frax ecosystem. It is also used for the algorithmic stabilizing of the FRAX price peg. As demand increases for FRAX, more FXS will be burnt than minted, which results in FXS supply being deflationary. However, the opposite can also happen where demand for FRAX decreases, and more FXS will be minted, resulting in FXS supply being inflationary.Frax funnels the profits directly into the FXS token that the protocol generates from seigniorage, i.e., profit generated by Frax Finance by issuing Frax, which is the difference between the actual market value and production costs. As we know, FXS’s price is volatile, but its supply is hard capped to 100 million. Therefore, this funneling of profit will increase the FXS price in the long run. So, if there is an increase in FRAX liquidity and usage in the DeFi space, its profit will increase. As a result, the price of FXS will also increase.veFXS is a vesting & yield system which is based on Curve’s veCRV mechanism. Users can lock their FXS for up to 4 years four times & the amount of veFXS, i.e., 100 FXS locked for four years, will return 400 veFXS. However, it is not a transferable token, nor does it trade on liquid markets.Frax Finance: What is an AMO?AMO stands for Algorithmic Market Operations Controller, i.e., an autonomous contract(s) that can perform open market operations algorithmically to maintain FRAX’s peg. It cannot arbitrarily mint FRAX from thin air and break its peg. Also, this keeps FRAX’s base layer stability mechanism pure and untouched.In Frax v1, there was only a single AMO, referred to as a base stability mechanism. In Frax v1, the collateral ratio of the protocol was dynamically rebalanced based on the market price of the FRAX stablecoin. If the price of FRAX was above $1, then the collateral ratio decreases, i.e., decollateralization. If the price of FRAX is below $1, then the CR increases, i.e., recollateralization. This decollateralization and recollateralization help find an equilibrium reserve requirement for the protocol to keep a very tight peg and maximize the capital efficiency of money creation.In Frax v2, we have multiple AMOs, where each AMO is like a central bank money lego with 4 properties;Decollateralization (if FRAX>$1): – Lowers the Collateral RatioEquilibrium (if FRAX=$1): – Doesn’t change the Collateral RatioRecollateralization (if FRAX