Skip to main content

What is ERC-7683?

ERC-7683 is a standard interface for cross-chain order protocols. It provides:
  • Standardized Order Format: Common structure for cross-chain intents
  • Gasless Orders: Support for meta-transactions with signatures
  • Solver Interoperability: Compatible with any ERC-7683 solver infrastructure
  • Unified Tooling: Works with existing ERC-7683 tools and services
Eco Routes implements ERC-7683 through two settler contracts:
  • OriginSettler (contracts/ERC7683/OriginSettler.sol): Handles order creation on source chains
  • DestinationSettler (contracts/ERC7683/DestinationSettler.sol): Handles order fulfillment on destination chains

ERC-7683 Order Structures

OnchainCrossChainOrder

For direct on-chain order creation:
ERC7683.sol

GaslessCrossChainOrder

For gasless orders signed by users:
ERC7683.sol

OrderData

Eco-specific order data structure:
ERC7683.sol

ResolvedCrossChainOrder

Standardized resolved order format:
ERC7683.sol

Creating Orders (Origin Chain)

The OriginSettler contract provides two methods for creating orders.

Function Signatures

From contracts/ERC7683/OriginSettler.sol:
OriginSettler.sol

Method 1: Direct On-Chain Orders

Create orders directly from your wallet:
1

Prepare OrderData

Encode your intent into ERC-7683 format:
2

Create OnchainCrossChainOrder

Wrap OrderData in the ERC-7683 order structure:
3

Approve Tokens and Open Order

Approve reward tokens and call open():

Method 2: Gasless Orders with Signatures

Allow solvers to create orders on behalf of users:
Users create and sign orders off-chain:

Filling Orders (Destination Chain)

The DestinationSettler contract handles order fulfillment.

Function Signature

From contracts/ERC7683/DestinationSettler.sol:
DestinationSettler.sol

Fulfilling an Order

1

Monitor Orders

Listen for Open events on origin chains:
2

Prepare Fill Data

Encode the required data for filling:
3

Execute Fill

Call the fill function:
This internally calls fulfillAndProve() to execute and initiate proving.

Resolving Orders

Get standardized order information:
OriginSettler.sol
Usage:

Complete ERC-7683 Example

Here’s a complete example using the ERC-7683 interface:

ERC-7683 Events

Origin Chain Events

Listen for orders:

Destination Chain Events

Track fills:

Comparing Native vs ERC-7683 Interfaces

Direct Eco Routes interface:
Pros:
  • Simpler structure
  • Direct access to all features
  • More efficient (less encoding)
Cons:
  • Not compatible with ERC-7683 tooling
  • Custom implementation for each protocol

Best Practices

Use ERC-7683 for Interoperability: If you want your orders to be visible to all ERC-7683 solvers and tools, use the standardized interface.
Use Native Interface for Integration: If you’re building a custom integration and want maximum control and efficiency, use the native Eco Routes interface.
Signature Security: When using gasless orders, ensure users understand what they’re signing. Always display human-readable order details.
Nonce Management: For gasless orders, track nonces carefully to prevent replay attacks. Use timestamps or incrementing counters.

Next Steps

Creating Intents

Learn about the native intent creation interface

Fulfilling Intents

Understand native intent fulfillment

Proving Intents

Learn about cross-chain proof mechanisms