Technical Deep Dive: How Flash Liquidity Will Work | The Radix Blog | Radix DLT

This communication is sent on behalf of RDX Works and details a set of products and services that RDX Works is in the process of developing in cooperation with a number of institutional and ecosystem partners.

Flash Liquidity is an advanced liquidity system in development by RDX Works for the Radix ecosystem. It redefines how liquidity is managed in decentralized finance (DeFi) by implementing a hybrid architecture that combines off-ledger liquidity expression with on-chain execution. This system enables professional market makers to provide liquidity without pre-funding on-chain pools, thereby maximizing capital efficiency while maintaining deep liquidity and seamless execution.

This deep dive explores the technical underpinnings of Flash Liquidity, with a particular focus on its innovative mechanisms such as Subintents, an off-ledger Order Messaging System, an on-ledger ecosystem of Solvers, Instamint, and the ecosystem actors that contribute to its success.

The Vision of Flash Liquidity

Flash Liquidity’s goal is to make any crypto asset, regardless of its native blockchain, liquid and accessible within the Radix ecosystem. It is built to scale quickly, initially targeting the top 50 crypto tokens by market cap, and is designed to provide both institutional and everyday users with a seamless and cost-efficient trading experience.

To achieve this, Flash Liquidity leverages a system that allows market makers to express liquidity offers off-ledger and only move capital when a trade is confirmed. This approach is fundamentally different from traditional DeFi protocols, where liquidity must be locked into on-chain pools before any trades can occur.

Flash Liquidity System Actors

The Flash Liquidity ecosystem is composed of four main actors, each contributing to the system’s overall functionality. Flash Liquidity acts as the infrastructure that facilitates interactions between these actors, ensuring liquidity, execution, and settlement are managed efficiently.

  1. Liquidity Providers: 
    • Role: These are market makers or professional liquidity providers who offer pricing streams at low spread and high depth, along with accurate market pricing. Their job is to ensure that trades can be fulfilled at competitive rates.
    • Benefit: In return for providing liquidity, they receive consistent order flow from decentralized exchanges (DEXs) and other DeFi applications on Radix.
  2. DEXs
    • Role: DEXes act as the entry point for user-generated order flow. They are responsible for routing trades from their users to the Flash Liquidity system and across on-ledger liquidity pools.
    • Benefit: DEXes benefit from receiving tighter spreads and best-price execution, improving on the liquidity already on offer on Radix and the overall trading experience for their users.
  3. Other DeFi dApps: 
    • Role: These include any dApps that require liquidity, such as lending, CDP based stable coins or perp platforms during liquidation events. They contribute additional order flow to the system.
    • Benefit: They benefit from faster execution and tighter pricing due to the efficiency and depth of liquidity provided by market makers.
  4. Solvers:
    • Role: Solvers are system participants responsible for matching orders and settling transactions on the Radix ledger. They take the subintents generated by market makers and users, match them from the off-ledger Subintent Pool, and construct the on-chain transactions.
    • Benefit: Solvers receive settlement fees for each transaction they execute on the Radix network.

This interconnected system of actors ensures that liquidity is available when needed, and that trades are executed quickly and efficiently, with minimal slippage or capital lockup.

Order Flow and Matching in Flash Liquidity

The Order Messaging System sits at the core of Flash Liquidity, acting as the central hub that coordinates liquidity and order flow between DEXes, liquidity providers, and other DeFi applications. Here’s the high level the order, matching and trade execution flow:

To dive a little deeper, here is a more comprehensive flow diagram of the same flow, but breaking open some more of the features and functions of the Order Messaging System:

Lastly, here is a process flow diagram showing the various steps involved in a successful trade:

Off-Ledger Liquidity Expression and Subintents

One of Flash Liquidity’s core innovations is the use of Subintents, which allow liquidity offers to be expressed off-ledger, and then matched with orders from traders and executed on ledger. This allows market makers and users to rapidly generate order flow, but only require on-chain settlement when an order is matched. 

Pre-authorizations function as a signed definition of what a particular market maker or trader cares about in a trade transaction, authorizing their part of a trade within predefined parameters (such as price, slippage, and time limits), and are held off-ledger until a match is found that can fulfill the requirements of the participants.

Pre-Authorizations and Subintents

Using Web2 infrastructure for efficient coordination requires the notion of partial agreements signed by different parties which can be relied on without the need to trust a centralized entity.

From the trader’s perspective, the solution is a “pre-authorization” request to their Radix Wallet. It is very similar to a transaction request, but it describes only a part of a final transaction – specifically the part that the user cares about, such as a swap they wish to perform within certain acceptable bounds. The pre-authorization is signed and returned to the dApp, which can then include it in a full transaction that fulfills the user’s desires, potentially even the desires of multiple parties at the same time. A time bound is put on the pre-authorization, so the user knows for how long their pre-authorization is usable.

Requests for the user to complete and sign the pre-authorization (of common patterns) can be displayed as pre-authorization requests in a user-friendly way. The user would also see the time bound to be used. Flash Liquidity trades, for example, would likely use a time bound of only a few seconds. This is to ensure that the user experiences a quick trade resolution, in a similar way as they would for any other kind of DEX swap.

Under the hood, pre-authorizations use a new technical capability of the Radix Network called subintents. Subintents allow users and entities to describe the wants they have (e.g. a swap from amount of [X] to amount of [Y], within a slippage bound of [Z], and a time period of [t]) without having to define how it is achieved. Multiple subintents can be combined into a final transaction, as long as they are all satisfied. The parts of a complete Flash Liquidity trade provided by both market makers and traders can be expressed as subintents and combined into final transactions.

With this method, a trader does not need to care where the liquidity is sourced from as long as they receive an amount of [Y] within the boundaries of [Z] and [t]. Their signed pre-authorization becomes a subintent that can then be matched, bundled with other subintents, and then submitted on-ledger.

Intent-Based Architecture is an emerging architecture found in Ethereum dApps offering better UX, cost, and flexibility. Subintents are Radix’s enshrined version of the concept, allowing all currently running dApps to inherit the benefits of an intent-based system without additional application logic or integration work.

Subintents are targeted to extend the popular Radix transaction manifest model. From the wallet perspective this means that the UX of displaying a pre-authorization request can have a similar presentation and offer the same sort of confidence that a user gets for regular transaction requests today. 

The release of subintent capability, and pre-authorization support in the Radix Wallet, is targeted to coincide with the release of a set of production systems that bring Flash Liquidity to the Radix Network.

The idea of intent-based trading is conceptually similar to CoW Swap (33Bn in traded volume to date) and UniswapX, but with the advantage of supporting any token from any ecosystem, and without the need for Market Makers to have on-chain inventory in order to provide liquidity.

Subintents Workflow

  • Liquidity Offer: A subintent is generated when a market maker or liquidity provider creates a liquidity offer with specific conditions (e.g., offering to trade xBTC for xETH at a particular price). These conditions are signed off-ledger, meaning no on-chain transaction occurs until the offer is matched.
  • Trade Order: A trader receives a pre-authorization request from a DEX describing the trade they wish to perform. It is signed off-ledger and returned as a subintent, where it can be matched against offers from liquidity providers.
  • Off-Ledger Matching: Once generated, subintents are fed into the Order Messaging System, which in turn pushes this into the Subintent Pool once for the Solvers to complete matching on and then execute. This off-ledger matching system ensures that trades only move to on-chain execution once the conditions of both sides are satisfied.
  • On-Ledger Execution: Once a match is found, the subintents are bundled together into a final transaction and submitted to the Radix ledger by a Solver. This allows the actual trade to be settled on-chain, optimizing transaction costs by ensuring that only completed trades incur gas fees.

The subintent system allows for a highly efficient trading process, where liquidity can be offered and trades matched without the friction of constant on-chain updates. Only once a trade is ready to be executed does the transaction hit the blockchain, saving on both capital and operational costs for the liquidity providers.

The Order Messaging System

The Order Messaging System is the core off-ledger infrastructure that powers Flash Liquidity’s matching engine. It is designed to facilitate the interaction between liquidity providers and DEXes, ensuring that liquidity offers are matched with user orders as efficiently as possible.

Key Features of the Order Messaging System:

  • Web2-Style API Integration: The system uses APIs that are familiar to market makers, closely resembling the Request for Stream (RFS) models used in centralized exchanges and OTC markets. This allows market makers to integrate their liquidity offers into the Flash Liquidity system with minimal disruption to their existing operations.
  • Subintent Pool: The system maintains a Subintent Pool, which functions similarly to a mempool in blockchain systems. Subintents are stored and sorted in this pool, where they can be picked up by Solvers for final matching and transaction construction.
  • Solver Role: Solvers are critical actors in the Flash Liquidity ecosystem, responsible for taking bundles of Subintents and constructing valid on-chain transactions. Once they find a matching set of Subintents, Solvers compile them into a single transaction, which is then submitted to the Radix ledger for execution.

The off-ledger nature of the Order Messaging System allows for a much faster and more efficient matching process compared to traditional on-chain systems. By delaying on-chain settlement until a trade is fully confirmed, Flash Liquidity significantly reduces gas costs and ensures that liquidity is always optimally deployed.

Order Types

The Order Messaging System is targeted to initially support Limit Good-Till-Time Orders. These types of orders require the least amount of trust from the system. In the future, the Order Messaging System is anticipated to also support:

Hybrid On/Off Ledger Architecture

Flash Liquidity’s hybrid architecture combines the best of Web2 and Web3 technologies, delivering high-performance liquidity management without sacrificing decentralization or security.

Advantages of the Hybrid Approach:

  • Capital Efficiency: Market makers do not need to lock up large amounts of capital in liquidity pools. Instead, they can offer liquidity off-ledger and only move assets on-chain when a trade is confirmed, freeing up their capital for other uses.
  • Reduced On-Chain Costs: By performing most of the matching and processing off-ledger, Flash Liquidity minimizes on-chain gas fees. Only finalized trades are submitted to the Radix ledger, meaning that unnecessary transactions are avoided, and costs are kept low.
  • Security and Decentralization: Although the matching process occurs off-ledger, the final settlement remains fully decentralized and trustless. All trades are executed on the Radix ledger, ensuring that users retain full control over their assets throughout the process.

Instamint and Dynamic Liquidity Provision

Another key technical innovation within Flash Liquidity is Instamint, which allows market makers to mint tokenized assets on-demand. Instamint is particularly important for improving the capital efficiency of liquidity providers, as it reduces the need for pre-funding liquidity pools.

Instamint Workflow:

Instamint operates on a credit-based system, allowing market makers to mint assets like xBTC when liquidity is needed for a trade. However, because minting ahead of settlement introduces counterparty risk, Instabridge carefully vets the market makers that are authorized to use Instamint, and assesses this on an ongoing basis. Here’s how the workflow operates:

  1. Onboarding and Authorization: Market makers must pass Know Your Business (KYB) and Anti-Money Laundering (AML) checks before being authorized for Instamint. They are also assessed for creditworthiness based on a series of on and off-chain credit checks.
  1. Issuing Authorization Badges: Once approved, market makers receive an Instamint authorization badge, allowing them to mint assets up to a predefined credit limit.
  1. Minting on Demand: When a trade is confirmed, the Instamint smart contract calculates the market value of the requested token (e.g., xBTC) and deducts the equivalent amount from the market maker’s credit balance until the wrapped asset is paid back or the underlying is settled to Instabridge. The token is then minted and immediately transferred to the counterparty.
  1. Post-Trade Settlement: After the trade is settled, within 24 hours or less, the market maker must deliver the corresponding asset (e.g., BTC) to Instabridge. Instabridge periodically updates the market maker’s credit balance based on price fluctuations and adjusts the credit accordingly.

This credit-based liquidity system mirrors traditional finance’s post-trade settlement practices, enabling fast and efficient liquidity provision without the need for excessive capital lockup.

Composability and Integration with Radix DeFi

Flash Liquidity is designed to be fully composable with other DeFi applications on Radix. Its integration points allow it to interact seamlessly with DEXes, lending platforms, and other dApps that require liquidity.

Integration Points:

  • DEXs and Aggregators: Flash Liquidity is connected to Radix’s DEXes via the Taker API, which provides real-time access to off-ledger liquidity. This allows DEXs to dynamically pull liquidity for trades and optimize price execution.
  • Other dApps: During liquidation events, lending platforms can tap into Flash Liquidity to source liquidity for liquidations, ensuring that assets are sold at the best price with minimal delay.
  • Cross-Venue Trading: Flash Liquidity integrates cross-venue trading, reducing the need for users to bridge assets across different ecosystems. This simplifies the trading process and improves the user experience by consolidating liquidity in one decentralized system.

Conclusion: The Future of DeFi Liquidity

Flash Liquidity represents a significant leap forward in the evolution of decentralized finance. By combining off-ledger liquidity offers with on-chain execution, it optimizes capital efficiency, reduces transaction costs, and ensures deep liquidity within the Radix ecosystem.

The innovations within Flash Liquidity—such as Subintents, the Order Messaging System, and Instamint—offer a new way for market makers and liquidity providers to engage with DeFi, making trading more efficient, secure, and scalable. As the system continues to develop, it will play a key role in shaping the future of DeFi, providing a more accessible, resilient, and liquid ecosystem for all participants.