From Fragmentation to Cohesion: Coordinating Last Miles to Unify Transaction Supply Chains
As the blockchain ecosystem evolves into a multi-chain world, the need for seamless interoperability across various networks has become critical. This expansion has given rise to essential off-chain agents such as relayers and solvers to act as connectors, enabling applications to communicate, transact, and collaborate across diverse blockchain ecosystems.
Relayers operate at the transportation layer between blockchains. Their primary function is to facilitate the transfer of data and messages across otherwise isolated blockchain ecosystems. Relayers transmit messages along with attached proofs, allowing the destination blockchain to verify the authenticity of the communication.
Solvers, on the other hand, play a more complex role. These off-chain agents go beyond simple message delivery. They act as general-purpose service providers, generating solutions that fulfill users' intents by performing necessary computations or tasks. After processing, solvers produce proofs that verify the authenticity and correctness of their results. These proofs, along with the computed solutions, are then delivered to their intended destinations.
Relayer Networks: The Logistics of the Blockchain World
Relayers are fundamental to cross-chain interoperability, much like how logistics networks streamline global deliveries in the physical world. They package and deliver proofs where they're needed across the blockchain ecosystem.
Relayers serve various functions in different contexts:
Ecosystem-Specific Interoperability: Protocols like the Inter-Blockchain Communication (IBC) use relayers to transmit transaction proofs between blockchains within the same ecosystem.
General Interoperability Protocols: Systems such as LayerZero and Hyperlane rely on relayers to transport cross-chain event proofs from attestation providers to verifiable contracts on destination chains.
Verifiable Compute Systems: Technologies like coprocessors, zero-knowledge provers, and Trusted Execution Environments (TEEs) need relayers to transmit proofs from the proving location to verification points.
The current landscape has led to a proliferation of bespoke relayer networks, each designed to meet specific needs. Every ecosystem, application, or service provider has unique requirements regarding what relayers should observe, where they should send transactions, how to generate transaction payloads, and how to optimize for liveness, routing, and fees.
This fragmented approach is inefficient and lacks interoperability. It's comparable to a scenario where every business in the physical world had to establish and maintain its own delivery network, managing door-to-door services independently.
To optimize blockchain relayer networks, we can draw insights from how real-world logistics have evolved. Over time, physical logistics networks have developed into specialized global coordination systems powered by a network of providers. Companies like DHL and UPS offer advanced tracking, routing, transportation, and quality control solutions to manage complex delivery systems efficiently.
These global networks are complemented by "last-mile" service providers - local delivery personnel who ensure packages reach their final destinations. This combination creates a scalable and efficient system where new participants only need to integrate with the global system through their local providers.
Instead of continuing with fragmented, ecosystem-specific relayer networks, the blockchain world could focus on developing a permissionless global relayer coordination platform. Such a platform would allow any relayer to onboard and collaborate, enabling seamless cross-ecosystem, cross-application, and integrated service delivery with global coordination.
Figure 1: Optimized Global Logistics Network with Global Coordination and Last Mile Service Providers
Solver Networks: The Supply Chains of the Blockchain World
While logistics networks primarily focus on the movement and delivery of goods, supply chain networks encompass the entire process of producing and delivering products - from sourcing raw materials and manufacturing to getting the final product into the hands of consumers. Supply chain networks are much broader in scope, covering all stages of a product’s lifecycle, with the logistics network being an integral part of that process.
This distinction is similar to the difference between relayer networks and solver networks. While relayer networks focus on observing and delivering generated proofs, solver networks are responsible for generating solutions that are provable to on-chain applications. Relayer networks typically address infrastructure-level concerns, while solver networks work directly with applications, handling advanced ”requests for services” with application-defined outcomes, known as intents. Although solver networks also manage delivery, their greater challenge lies in generating verifiable outcomes in the first place.
At Khalani, we take a comprehensive view of solver networks - we see the entire transaction supply chain, from the moment a user signs an intent or transaction in their wallet, to when one or multiple transactions are included on a single blockchain or across multiple blockchains. Every off-chain actor that interacts with the intent, transaction or each other along the way is considered a solver.
Aggregators need routing solvers to generate the optimal on-chain route for executing swap orders.
Intent bridges require cross-chain solvers to facilitate asset transfers across different blockchains.
Intent swap apps depend on market-making solvers to help users execute trades on-chain.
Lending applications rely on liquidation solvers to liquidate margin positions and prevent bad debt.
Applications need sequencing solvers to sequence application-specific order flows and internalize MEV.
Block proposers require block-building solvers to help build the best possible blocks.
Currently, solver networks are often tailored to specific applications. This leads to inefficiencies where solver teams must develop separate off-chain software for similar applications due to differences in intent representation, solution verification, and solver participation rules.
From our conversations with founders, it's clear that both application developers and solvers struggle to keep up with the complexity of off-chain integrations. Most application developers don’t want to build, operate, and optimize a custom solver network - it’s akin to asking every shop to build the entire supply chain for all the products they sell. Similarly, solvers are overwhelmed by the need to individually integrate with each application’s intent order system, settlement conditions, and preferences, often extending to new blockchains. It’s as if every manufacturer were expected to manually integrate with the fulfillment and logistic systems to work with every online marketplace.
Building a generalized solving infrastructure is exceedingly challenging because it must manage complexity and provide abstraction across three interconnected dimensions:
The commitment system: intent representation, signature schemes, account models, credible commitment devices, blockchains and their confirmation rules
The settlement system: solution representation, settlement execution, verification rules, settlement oracles, cross-chain proof systems and settlement currencies
The solving system: specializations such as pricing, inventory optimization, liquidity sourcing, indexing, external data, and AI powered intelligence systems
Khalani: Coordination Infrastructure Empowering Crypto's Last Miles
In today's multi-chain world, the blockchain's transaction supply chain is fundamentally broken. As applications proliferate across blockchain networks, the process of executing transactions has become increasingly fragmented and inefficient. A multitude of off-chain actors – including relayers, solvers, app-specific sequencers, auction providers, co-processors, provers, pre-confirmation providers, sequencers, searchers and builders – have emerged to facilitate these transactions, but their integration has been largely sporadic and ad-hoc. This has resulted in a complex, often opaque system where transactions face significant bottlenecks and inefficiencies as they move through various stages – from initiation to final settlement across multiple blockchains. This fragmented process mirrors the challenges once faced by traditional industries before the advent of modern supply chain management.
Khalani is a platform that brings supply chain efficiency to the crypto ecosystem. Just as supply chains streamline the production and flow of goods in the physical world, Khalani optimizes the lifecycle of crypto transactions. It serves as a central coordination system, seamlessly connecting various blockchain networks and crypto services.
At its core, Khalani provides an open coordination and optimization system. This system allows any local integration to extend Khalani's capabilities by formally defining its interface. In supply chain terms, think of Khalani as the central coordination system with distribution hubs, with each integration serving as a local warehouse or last-mile delivery service. Khalani automates the runtime integration and optimization of these services, ensuring that user intents and transactions are fulfilled efficiently and effectively.
Khalani's architecture is designed to be highly extensible and modular, allowing various systems to connect as "last-mile" providers. To better understand these components, let's draw parallels with traditional supply chain systems:
Commitment systems, or 'intent last-miles', can be compared to ordering and payment processing systems in traditional supply chains. Khalani allows permissionless onboarding of a wide variety of commitment systems on how users express intents. Any spoke system can connect to Khalani by formalizing its interface in Khalani's specification language, and automatically integrated with all other participants in the Khalani ecosystem.
Settlement systems, or 'settlement last-miles', are analogous to delivery verification in traditional supply chains. In Khalani, these systems ensure that crypto transactions or user intents have been properly executed or filled, and recorded on the appropriate blockchain. Any application specific settlement conditions can be formalized and integrated with Khalani, and can be used in the context of Khalani’s counterparty selection process to source solving abilities.
Solving systems, or 'solution last-miles', are similar to fulfillment and manufacturing processes in traditional supply chain networks. These are the systems that actually produce the products in the physical supply chain. In Khalani, solving systems involve generating the eventual settlement transaction or finding the optimal solutions to fulfill the user's intents. Khalani allows permissionless onboarding of any solvers or service providers by deploying formal specifications on their provided services.
Within the Khalani Network, intents, settlement obligations, and solving are unified under a common language and coordinated within a distributed global state machine. Besides enabling last-mile integrations, this unified approach enables a wide range of functionalities to be programmed directly on Khalani as decentralized protocols:
Expressive intents (programmable order specifications)
Risk underwriting (insurance in shipping)
Outcome-focused optimization (route optimization)
Inventory management (stock management in warehouses)
Liquidity preferences and services (financial services)
Counterparty discovery (finding suppliers or distributors)
Settlement constraints (special handling instructions)
Collaborative solving (service providers forming business agreements)
By functioning as a unified coordination and optimization infrastructure, Khalani aims to build crypto's open and unified supply chain network. Each connected system across various dimensions acts as a last-mile extension, much like how local delivery services handle the final step in traditional supply chains. This approach allows for both standardization at the core and flexibility at the edges, enabling the crypto ecosystem to scale and adapt to new technologies and user needs.
This architecture allows Khalani to connect and expand in multiple directions:
Applications can connect to Khalani, transforming into intent-centric applications with access to a global solver network through their local solvers.
Markets can connect to Khalani, evolving into global intent markets managed by their local operators.
Solvers can connect to Khalani, becoming super solvers by collaborating with other solvers serving all markets and settling everywhere.
This democratizes access to efficient crypto transactions and paves the way for the next generation of blockchain innovation, creating a more interconnected and efficient crypto ecosystem – much like how modern supply chain management has revolutionized global trade and commerce.
Figure 2: Optimized and Unified Crypto Supply Chain Network with Khalani Serving as the Global Coordinating Infrastructure for bespoke “last-mile” systems.
A Software Architecture Pattern
Khalani's structure mirrors a pattern found in modern software architecture known as "Functional Core, Imperative Shell". This approach balances core consistency with edge complexity to manage growing system complexity.
The Core: Comprised of pure functions and immutable data structures, forming stable and reliable abstractions. This core remains consistent and unchanging, providing a solid foundation for the system.
The Shell: Where complexity resides, including I/O operations, imperative code, and integrations with external systems. This "edge" of the system allows for flexibility and adaptability.
Edge components interact through the stable core, allowing extensibility without compromising system integrity.
Khalani, as decentralized solving infrastructure, implements this pattern to scale domain complexity:
The "Functional Core": An open, decentralized, and immutable coordination infrastructure with domain abstracted services
The "Imperative Shell": Local solvers handling bespoke integrations
Integrations: Solvers collaborate through the core infrastructure
This approach distributes complexity across the network while maintaining a reliable central abstraction, enabling Khalani to effectively manage the blockchain ecosystem's growing intricacies.
The Ultimate Off-chain Infrastructure
Khalani represents crypto's ultimate off-chain infrastructure, unifying all off-chain actors, services, networks, and infrastructure. By enabling permissionless innovation, it fosters an ecosystem built on efficiency, interoperability, and open collaboration. Khalani brings much-needed cohesion to decentralized systems, effectively managing their growing complexity. In doing so, it paves the way for a unified ecosystem capable of evolving alongside rapid crypto innovations.
Special thanks to Tannr, Jose, Dougie and Arjun for valuable feedback on this article.