Skip to main content
Warp Router integrates with multiple DeFi protocols through a flexible adapter architecture, supporting both same-chain and cross-chain settlement flows.

TheCompact Protocol

TheCompact is a cross-chain intent execution protocol that enables users to lock tokens and execute operations across multiple chains.

Contract Address

From Constants.sol, TheCompact is deployed at the same address across all supported chains:
TheCompact uses deterministic deployment (CREATE2) for consistent addresses across chains. Verify the address for your specific chain in the official deployment documentation.

Integration Points

CompactArbiter

The Router integrates with TheCompact through the CompactArbiter contract:
From ArbiterBase.sol:66-76.

Mandate Hash Computation

From ArbiterBase.sol:207-209:

Compact Features

Resource Locks

Lock tokens on origin chain for cross-chain claims

ERC-7683 Standard

Follows cross-chain intent standard

Pre-Claim Operations

Execute setup operations before claim

Gas Stipends

Allocate gas for complex operations

Compact Order Structure

From SameChainAdapter.sol:76-81:

Pre-Claim Operations

TheCompact supports pre-claim operations that execute before settlement:
From ArbiterBase.sol:170-187.

Permit2 Protocol

Permit2 is Uniswap’s signature-based token approval system, enabling gasless approvals through signed permits.

Contract Address

From Constants.sol:14-15:
Deployed at: 0x000000000022D473030F116dDEE9F6B43aC78BA3
Permit2 is deployed at the same address on all major EVM chains (Ethereum, Arbitrum, Optimism, Base, Polygon, etc.)

Integration Points

Permit2Arbiter

From ArbiterBase.sol:33:

Permit2 Order Structure

From SameChainAdapter.sol:95-98:
Simpler than Compact - no allocator data or other elements needed.

Permit2 Features

Gasless Approvals

Users sign permits off-chain instead of on-chain approvals

Batch Transfers

Transfer multiple tokens in a single transaction

Nonce Management

Built-in replay protection via nonces

Expiration

Time-limited permits for security

Permit2 Mandate Hash

From ArbiterBase.sol:275-277:
Same structure as Compact but different validation flow.

EIP-712 Integration

Permit2 uses EIP-712 structured data signing:
From EIP712TypeHashLib.sol:280-287.

Cross-Chain Support

Warp Router supports cross-chain settlements through specialized adapters and arbiters.

Same-Chain Settlements

For operations where origin and destination are the same chain:
From SameChainAdapter.sol:172-177. Flow:
  1. Pre-fund recipient with output tokens
  2. Claim input tokens via arbiter
  3. Execute target operations
  4. Emit fill event

Cross-Chain Settlements

For operations across different chains:
1

Origin Chain

User locks tokens using TheCompact on origin chain
2

Notarization

Order is notarized and propagated to destination chain
3

Destination Claim

Solver claims on destination chain via Router
4

Settlement

Arbiter validates and executes operations

Multi-Element Orders

TheCompact supports multi-element orders for complex cross-chain flows:
From EIP712TypeHashLib.sol:231-232.

Direct Routes

Direct routes allow operations without adapter overhead.

Single Call

From DirectRoutes.sol:121-127:
Use case: Simple external calls without adapter logic

Multi Call

From DirectRoutes.sol:128-134:
Use case: Batch multiple calls in single transaction

Fee Collection

In-router fee collection without delegatecall:
From DirectRoutes.sol:160-165.

Adapter Registry

Adapters are registered using the Router’s adapter management system.

Installing Adapters

Requires ADAPTER_ADDER_ROLE from RouterManager.

Adapter Lookup

From RouterLogic.sol:254:
Lookup by selector returns both address and configuration tag.

Adapter Tags

Adapters can declare special behaviors via tags:
From IntentExecutorAdapter.sol:227-229. Available flags:
  • setSkipRelayerContext(): Adapter doesn’t consume relayer context
  • Default tag: Standard adapter behavior

Protocol Compatibility Matrix

ProtocolSame-ChainCross-ChainPre-Claim OpsGas Stipends
TheCompact
Permit2
Direct Routes

Integration Examples

TheCompact Integration

Permit2 Integration

Version Management

From Version.sol:
Adapters declare versions via SemVer:
From SameChainAdapter.sol:144.
Always verify protocol contract addresses on-chain before integration. While Permit2 uses a consistent address, TheCompact and other protocols may vary by chain.