Results for ""
DeFi, Analysis

Navigating Trades with Intent

Decentralized exchanges rethink their future with intents
563 563 Nov 1, 20237 min read
4
1
Navigating Trades with Intent

Imagine you're in the process of booking your next vacation. You go to a travel aggregator, input your trip details – like where you're flying to and from, your travel dates, and your preferences for the number of stops – and click "Search." In response, you're presented with a long list of flight options from various airlines, complete with prices and departure/arrival times. It's a lot of information to sift through.

However, if we distill our desire down to its most basic form, it boils down to a simple statement: "I want to travel from <origin> to <destination> on <date> with <X stops>."

In this scenario, a travel agent can step in to do all the heavy lifting for you. They can find the best flight option that matches your criteria and save you the time and effort of combing through all those choices. Of course, in the real world, travel agents charge a fee for their service.

With an intent-based architecture in DeFi, Solvers play the role of your personal travel agent, thinking up clever ways to fulfill your request. And the best part? Unlike a real-life travel agent, this actually saves you money.

With intents, all you need to do is say something like, "I want to buy 0.1 ether at a maximum price of $180." At this point, a swarm of Solvers jumps into action, competing to execute your order at the best possible rates. They source liquidity from both onchain and offchain sources, finding the most cost-effective and efficient way to fulfill your request. This represents a significant improvement in the user experience for those involved in crypto transactions and is a step toward increasing onchain activity.

Automated Market Makers (AMMs)

The inherent constraints of building on crypto rails led AMMs to dominate the DEX market, particularly on Ethereum mainnet. This form of passive liquidity provision meant that there was always a buyer to all users who wanted to sell (and vice versa), and it has worked well enough for many use cases.

With the evolution of DeFi sufficiently underway, the shortcomings of AMMs have become all too obvious. Toxic order flow and impermanent loss (or Loss vs Rebalancing) make it difficult for retail users to come out ahead. As DeFi evolves, we must grapple with the intricacies of toxic order flow and impermanent loss in the context of AMMs – unless there is a better way.

vAMMs and CLOBs

Virtual AMMs (vAMMs) and Central Limit Order Books (CLOBs) emerged as alternatives to the vanilla AMM, each with its own selling points. 

vAMMs, popularized by GMX's GLP model on Arbitrum, allow liquidity providers (LPs) to act as the counterparty to traders. Traders can leverage trade against the isolated liquidity pools with guaranteed execution and predictable slippage - a nice upgrade over the basic AMM.

The big drawback of vAMMs outside of liquidity constraints and the diminutiveness of tradable assets is the reliance on oracle price feeds.

Central Limit Order Books (CLOBs), at first glance, seem like an apparent eventuality for onchain trading. After all, they are the go-to architecture for trading both digital assets and traditional securities on centralized platforms. On top of market transparency, they also offer true internal price discovery, which can't be said of the vAMM design, which pipes price feeds from external sources.

Sounds nice, right?

But when we try to construct a CLOB onchain, we run into some hurdles. Centralized order books, such as on Binance, don't have to worry about gas fees or 12-second block times, which all but squash CLOBs on Ethereum. Even on high-TPS chains such as Solana, the 400 ms block times are a snail's pace when Binance is ordering millions of transactions per second. Projects such as dYdX have taken the approach of creating their own application-specific blockchains in pursuit of the CLOB dream - but it doesn't come for free.

In order to achieve a CEX-like CLOB experience, blockchains would have to become increasingly centralized, either relying on enterprise-level computing infrastructure and/or moving order matching offchain. Both of these paths are being investigated, but neither sits quite well with the decentralization-maxis among us.

If only there were a way to achieve the coveted CEX-like experience on-chain without having to compromise on the hardware and infrastructure requirements…

Intents & RFQ

Apps that utilize an Intent-based architecture offer their users a powerful way to express their preferences and then rely on Solvers, often referred to as "searchers," "fillers," or Market Makers, to fulfill those preferences. These "intents" can range from the straightforward, such as "I want to swap 1 ETH for at least 1600 USDC," to the highly complex, like "I want to take a 10x leveraged short position on UNI on the mainnet, using AVAX on Avalanche as collateral." The possibilities truly are endless.

Now, before we dive into the technical nitty-gritty, it's important to distinguish between Intent-based and Request for Quote (RFQ)-based designs. RFQ is a specific category of intent where users request a price quote from the protocol, and Solvers, often Market Makers, compete to provide the best quote. The user can then choose to accept or reject these quotes.

In the realm of RFQ, Solvers are typically recognized (whitelisted) entities that are authorized to generate quotes for users.

An intent-based design basically allows all liquidity to be accessible onchain. Whether liquidity is sourced from:

  • A centralized exchange (e.g., Binance or Coinbase)
  • A decentralized exchange (e.g., Uniswap or Curve)
  • An over-the-counter (OTC) desk
  • A filler's inventory

It doesn't matter -- a Solver can utilize it for liquidity. Think of Solvers as digital asset liquidity aggregators, and where substantial liquidity exists, users can expect better price execution.

Let's take UniswapX's architecture as an example of how this works in practice.

Source: Delphi Digital

A user wishing to sell their ETH sends a trade through UniswapX, which then opens up an auction to fill their order. This is notably different from a standard Uniswap order because now, Solvers aren't limited to pools within Uniswap but could use a Balancer pool, a Coinbase market, an OTC desk, or just fill from their own inventory of USDC to make the swap.

  • Before: sell_price = max(Uniswap pools)
  • After: sell_price = max(All DEXs, CEXs, OTC, etc.)

You could even imagine scenarios where Solvers would be incentivized to undercut their competition:

"Example: Solver wants to rebalance from X chain to Y and the user's orders allow them to do just that. This lets them save fees and time, so they are incentivized to win the auction and can offer a better price than what the user had asked for originally." - Arjun | LI.FI (@arjunnchand) on X

This scenario would never play out naturally on a DEX before intents.

Moving price discovery onchain

Today, price discovery for major digital assets is confined to centralized exchanges, namely Binance. It is a chicken-and-egg dilemma since market makers (who facilitate the price discovery process) are encouraged to use the marketplace with the most liquidity. And where does the liquidity come from? The market makers themselves, of course.

David mentioned in his "5 Big Questions" article that "if decentralized systems are going to 'win,' we need that trophy" of price discovery to take place onchain. Intents offer a new solution.

With intent-based DEXs, market makers can leverage any source of liquidity, which opens their aperture of potential money-making strategies – a provable improvement over being limited to centralized exchanges.

So, while it is likely true that early iterations of intent-based DEXs will source most liquidity and price discovery from CEXs…

This is only the beginning. Long-tail assets (i.e., tokens outside of the top 50) already house most of their liquidity onchain. 

Now, with intent-based markets being housed and run on crypto rails, price discovery can start shifting more and more toward decentralized arenas. 

Moving towards further abstraction

DeFi, no doubt, is a labyrinth of complexity. Expecting your Aunt Cheryl to effortlessly start swapping tokens in this world is like asking someone to build a rocket from scratch. There are formidable hurdles that need to be broken down before we can truly open the doors to the masses.

Enter "Intents." These nifty innovations take the complexity burden off the user's shoulders and place it squarely on the backs of sophisticated market makers. These market wizards are motivated by incentives to provide users with the best prices, essentially acting as the DeFi guides that your Aunt Cheryl (and countless others) desperately need. Alongside this, technologies like Intents and ERC-4337 Account Abstraction wallets are diligently working to lay down the infrastructure for the next billion crypto users.

It's incredibly heartening to see a plethora of teams enthusiastically forging the path towards an intent-based future. We've got the likes of CoW Swap, UniswapX, and 1inch Fusion, focusing on spot trading. Thena, IntentX, and Pear are diving headfirst into the world of derivatives. Flashbot's SUAVE is busy taming the ever-elusive Maximal Extractable Value (MEV), while Anoma, Symmio, and Portals are busy bolstering intent-based infrastructure. The enthusiasm for this new DeFi primitive is nothing short of exhilarating.

Now, let's face it. The DeFi aficionados among us might find joy in juggling multiple wallets, hopping across bridges, and seamlessly navigating through a maze of DEXs and lending platforms. But they are the exception, not the rule. For the majority, especially those outside the crypto inner circle, the tech that simplifies their user experience isn't just a nice bonus; it's an absolute necessity. If we genuinely aspire to see mainstream adoption of these powerful tools, user-friendly technology is the name of the game.

So, what's the deal with Intents? Can they single-handedly solve the liquidity fragmentation issues plaguing digital assets? Well, that's a question only time can answer. But one thing's for sure: we're absolutely pumped about their potential. These innovations have the promise to not only simplify the DeFi landscape but also bring it within reach of those who've been standing at the threshold, waiting for an invitation.

If you want to dive deeper into the world of intents, you're in luck. Our friends at Blockworks just released an excellent discussion with Flashbots and UniswapX builders, where they discuss the big questions surrounding intents.

563

Written by 563

4 Articles View all      

Bankless Contributing Analyst. Exploring the extremities of DeFi from a fundamentals-driven lens.

1 Response