How f(x) Protocol is Building a Novel DeFi Primitive w/ Aladdin DAO

Samuel McCulloch
Samuel McCulloch
Oct 11, 2023
How f(x) Protocol is Building a Novel DeFi Primitive w/ Aladdin DAO

Action Items

In this week's deep dive, we invited Crouger and Kmets from Aladdin DAO to explore the groundbreaking leveraged product they've pioneered with the f(x) Protocol. We think they've created a brand new 'primitive' that could shape how we use Ethereum. We aim to simplify and unpack these complex concepts for our readers & viewers so everyone understands the mechanics and risks of f(x) Protocol.

Historically Primitive 

One of the most impressive things about our industry is the unbounded design surface builders engage with. The largest protocols in DeFi like Uniswap and Compound are built on extremely simple ideas; x*y=k, overcollateralization, or in Frax’s case the floating CR for Frax v1, AMO’s and frxETH’s two token design, etc. 

Once the lightbulb comes on, these methods for creating new primitives seem obvious. We say to ourselves “the math is so easy, why hasn't anyone done this before?” But that’s the thing about learning new concepts, after a period of time, we forget what the state of unknowing was like. For the life of me I have a hard time remembering what crypto was like before DeFi at this point. I remember buying my first Bitcoin in 2011, but can’t remember what wallet or exchange I was using. I also can barely recall what it was like to trade on-chain before Uniswap V2. 

I vaguely remember firing off some EtherDelta trades, which utilized an order book for listing trades while the actual transactions were settled via smart contracts. Following EtherDelta was the 0x project, however, while 0x enabled trustless trading, traders encountered difficulties replicating experiences found in traditional exchanges. To bridge this gap, “Relayers” were developed, essentially acting as message boards displaying potential trades. But this was suboptimal as the relayers required CEX pricing to work. Then in 2019 Uniswap came along and everything was changed forever. 

Our memories are heavily influenced by survivorship bias, we tend to remember highly charged emotional events that shape our life choices, while discharging the mundane with rapid indifference. 

Maybe it’s for the best that we quickly lose sight of the past. 

The Luna collapse is already a year behind us, Flywheel emerged from its ashes as a way to combat the negative sentiment concerning stablecoins and now champions DeFi. Today is actually 11 months to the day from when FTX collapsed. SBF is on trial with his closest companions now testifying against him. I wonder what thoughts will be in 20 years. Will he repent in prison after two decades of destimulation?

In 2050 when SBF walks out of Federal Prison he’ll open up a laptop to find the ancient history of Ethereum immaculately preserved. And most likely all of the core primitives we use today will still be in use. They will persist because of their simplicity and battle tested design. Future traders will use Uniswap v50 to trade fully off-chain in regulated venues akin to stock brokerages we use today. But even still, Uni v2 contracts will play its role capturing the long tail of assets. 

DeFi Primitives

In the context of DeFi, a primitive refers to a foundational component or building block on top of which more complex protocols, assets or tools can be built. Primitives are the essential “money legos” that enable functionality and allow for devs to combine and dissect them for novel financial applications. 

Here are some examples:

  • Stablecoins: Tokens pegged to the US dollar with their value collateralized on or off-chain. 
  • Automated Market Makers (AMMs): Protocols, including the likes of Uniswap, Balancer, Curve, and Sushi fall under this category. They enable users to directly trade tokens from liquidity pools, with liquidity positions fungible and tradable. 
  • Lending Protocols: Platforms like Fraxlend, Compound and Aave have carved a niche where users can lend their assets to earn interest. When you borrow from them your given a receipt token, which can be used as collateral elsewhere. 
  • Synthetic Assets: On-chain assets that emulate the value of real-world commodities or securities, bridging the gap between conventional and decentralized finance.
  • Yield Aggregators: Platforms like Yearn, Convex, and others integrate with core trading protocols to achieve optimal returns.
  • Derivatives: Platforms including dYdX, Kwenta, and GMX offer derivatives in the DeFi landscape. In the future these venues will tokenize positions and strategies, enabling use in wider DeFi. 
  • Liquid Stakind Derivatives: The newest and most popular primitive in 2023.
  • Bonding Curves: Esoteric, but seeing a resurgence of activity since the launch of Friend.tech.

A common theme amongst all of these primitive types is that they are immutable and composable.

Understanding the Basics

f(x) Protocol creates a novel Ethereum primitive that takes LSD ETH (stETH for now, a basket later to include sfrxETH) divides it into a combination of  fETH, a low-volatility "floating stablecoins" and xETH, a high volatility "leveraged ETH."

Think of these as innovative DeFi tools that offer a unique way to interact with Ethereum.

fETH, standing for 'fractional ETH', is a token whose price shifts at just a fraction of ETH's movements. For instance, if ETH increases by 10% in a day, fETH will only rise by 1%. Similarly, a 10% decline in ETH would result in just a 1% drop in fETH. It offers a more stable experience by reducing ETH's volatility. 

On the other hand, xETH serves a different purpose. The 'X' signifies multiplication or leverage. While fETH moves more subtly with ETH's fluctuations, xETH does the opposite. It magnifies ETH's price changes. This means when ETH's price experiences minor changes, xETH's price witnesses major shifts. Essentially, xETH holders take on the brunt of ETH's price movements, shielding fETH holders from extreme volatility.

Kmets gave us a simple analogy: Imagine an M&M candy. The chocolate core, which we want to safeguard, represents fETH. The protective hard candy shell is xETH, which shields the inner chocolate (fETH) from external factors, ensuring it remains intact. 

No liquidation, No funding costs, A balancing Act

The biggest selling point for xETH is that it has no threat of “liquidation” and zero funding costs. For this service, f(x) Protocol collects all of the staking rewards from the stETH. These fees go towards the DAO treasury and the rebalancing pool. 

One thing to remember though is that xETH’s value is entirely relational to the TVL size of fETH.

At any given moment, both fETH and xETH possess a net asset value, which means you can exchange either asset for equivalent value of staked ETH from the treasury whenever you wish. Thus, if the ETH price undergoes a significant drop, the value of xETH in terms of staked ETH from the reserve will decrease accordingly. Crouger told us in the interview, “The total market cap of xETH plus the total market cap of fETH has to equal the total market cap of the reserve.”

Since xETH holders take on 90% of the price volatility, as the price declines, xETH becomes increasingly leveraged. The leverage of Xeth is determined by the ratio of fETH minted to the total value of xETH minted. It’s a proportional function that determines the value and rate of change for both assets. 

Think of it this way: if there's a large amount of xETH, the volatility of the total pot of collateral ETH is spread across a greater number of tokens, resulting in a reduced amplifying effect. Conversely, with fewer xETH tokens, the same volatility becomes concentrated, increasing the leverage. 

When Collateral Hits the Fan

The Rebalancing Pool is a farming vault for fETH that provides high yields in stETH, derived from the staking yields of the reserve. 

The Pool’s primary function is to ensure fETH always maintains a collateral backing of greater than 130%. 

When the quantity of fETH minted significantly surpasses that of xETH, the protocol can automatically redeem fETH in this vault to stETH to maintain stability. The redemption sources fETH from all depositors proportionally, similar to Liquity’s Trove system. 

Note that there is a 2-week waiting period after a withdrawal request before the fETH can be claimed. During this period, the withdrawal-requested fETH doesn't earn yield but remains eligible for redemptions. In essence, by depositing fETH into the Rebalancing Pool, you can earn high stETH yields and occasionally convert your assets into stETH.

xETH can go to 0

In the rare scenario (<0.1% likelihood, as the Aladdin team notes in the whitepaper) where ETH experiences a drastic price crash, one so severe that neither the rebalancing pool nor minting incentives can stabilize the system, the xETH value might plummet to zero. Yes, zero. Remember, the value of xETH is entirely relational, you could potentially buy xETH at the pico bottom and ride it to 10k, but if there is a huge crash and the protocol can’t deleverage fast enough, your whole stack would be wiped. 

Kmets told us “The protocol has several strategies to liquidate fETH and incentivize xETH minting (we also have some other potential ideas to keep xETH in the system), but you are correct…your xETH would be worth $0 and have essentially infinite leverage.”

This situation represents the closest equivalent to a liquidation on f(x). Under such circumstances, fETH would have exclusive rights over the reserve, causing its NAV to mimic the full ETH price fluctuations, not just its usual 10%. Regardless, fETH remains redeemable. Should such an event transpire, the whitepaper outlines procedures to recapitalize the protocol.

On the flip side, if the price of ETH were to skyrocket to 10k overnight, the effective leverage of your xETH position would tend towards 1x. So all of the risk is to the downside in a flash crash. 

Leveraged Primitives

The launch of xETH and fETH on Ethereum is a new type of primitive we’ve not had before in crypto: a fully trustless, contract driven leveraged asset with a very low risk of blowing up. It’s a great building block to be used in other parts of crypto.

One of the things I’ve always hope would take off in crypto would be constant leverage tokens. These assets use debt markets to add collateral or deleverage whenever markets move a certain %. For example, deposit 10 sfxETH into Fraxlend, borrow FRAX, but more sfrxETH, repeat and increase collateral to 20 sfrxETH total. As the price of ETH goes up and down, the strategy rebalances constantly to maintain the leverage. These strategies are great in bull markets, as borrowing and rebalancing costs constantly eat away at your core capital position, long gamma, long theta as they say in options world. 

With xETH though, the strategy is quasi long-delta, short gamma in a way, as the position moves up, you lose leverage, very similar to how Uniswap LP “lose” to impermanent loss. Since you are long the asset (ETH), prices going up are beneficial, but the strategy underperforms versus an algo-managed-long in a centralized exchange or perp DEX. 

That’s the trade-off with the choice of using f(x) Protocol, it may not be the most optimal from a trading perspective, but it is retail friendly and composable for the rest of DeFi. And at the end of the day, when building primitives, this is the core required function and the reason f(x) Protocol might have built the next big innovation for leverage. 



More from Flywheel

View More

Subscribe and join the Flywheel family

Always Free. Never Spam.

Harness the power of the flywheel.

Not financial advice. Flywheel content is strictly educational and is not investment advice or a solicitation to buy or sell any assets or to make any financial decisions.

Flywheel and affiliates are not liable for any investment losses or damages resulting from your reliance on any information provided.

2023 ©️ Flywheelpod Inc. All rights reserved.