Skip to content

Jincubator Limit Order Protocol: Unite Defi (2025)

Overview

The protocol implements extensions to the 1inch limit-order-protocol. To enable ERC-6909 support, resource locking and enhanced price discovery. It also facilitates back running of swaps as part of Interaction Order Extensions.

Stretch Goals include enhance price discovery and NEAR Fusion+ integration.

Public page is here and hackmd article is here

Design

For Unite Defi we are working on 3 separate but compatible streams.

Limit Order Protocol

Here are the Key Features Under Consideration

  • Price Discovery: Integrating Pyth Oracles such as Redstone to improve Price Discovery
  • Stop Loss Orders: Implementing a Holistic Advanced Limit Order (HALO) using a Predicate which passes price criteria for execution
  • ERC-6909 Support: We implement the ability to Lock Resources in an ERC-6909 compatible Extension
  • No Liquidity Solving (Same Chain Only): Provide the ability for Resolvers to use the Locked Resources as part of the Solve
  • Portfolio Management: We implement the ability to rebalance the maker or takers assets during the fill with an Interaction

Near Fusion+

We Integrate Near and 1inch Fusion (see near-fusion-plus)

  • Near Contracts for hash lock and time lock functionality
  • Swap Functionality between Ethereum and Near via Fusion Plus
  • Demonstration of bidirectional token transfers between Ethereum and NEAR

Near Solver Built with NEAR's Shade Agent Framework

A decentralized solver which works with 1inch Fusion+

  1. Smart Contracts
    • solver-registry: Support liquidity pools creation. Manage registration and verification of TEE solvers for each liquidity pool.
    • intents-vault: The vault contract that manage the pool's asset within NEAR Intents.
  2. Solver Management Server
    • A Rust based server that manages the lifecycle of TEE solvers
    • Handles solver deployment and monitoring for each liquidity pool

Design Questions

  • Passing of Extension Information when building an order
  • Custom Limit Orders should not be posted to official Limit Order API. Answered
    • Scripting is fine for the Hackathon
    • We don't need to build out our own API
  • Resolver - Contract as part of protocol?
  • Relayer - Is relayer a contract or service?

Implementation Details

Limit Order Protocol Improvements

Price Discovery Improvements

  • Tycho Indexing: For Streaming of State Changes of DeFi Protocols
  • Tycho Simulation: For Price Discovery
  • Pyth Oracle Integration: For Price Discovery

Fusion+ to Near Implementations (Stretch Goal)

  • Relayer
  • Resolver

Near Solver Built with NEAR's Shade Agent Framework

Components

Foundational (git modules)

  • limit-order-protocol: 1inch Limit Order Protocol Smart Contract. Key features of the protocol are extreme flexibility and high gas efficiency
  • https://github.com/1inch/cross-chain-swap: 1inch Network Fusion Atomic Swaps
  • the-compact : The Compact 🤝 ERC-6909 Resource Locking Mechanism an ownerless ERC6909 contract that facilitates the voluntary formation (and, if necessary, eventual dissolution) of reusable resource locks.
  • Tycho Execution: Tycho Execution makes it easy to trade on different DEXs by handling the complex encoding for you. Instead of creating custom code for each DEX, you get a simple, ready-to-use tool that generates the necessary data to execute trades. It's designed to be safe, straightforward, and quick to set up, so anyone can start trading without extra effort.

References

Code

  • Limit Order SDK:1inch Limit Order Protocol v4 SDK
  • Cross Chain Resolver Example: An example Cross Chain Resolver
  • Cross Chain SDK: SDK for creating atomic swaps through 1inch
  • p2p network (Relayer): consists of several key components that work in concert to provide a decentralized service layer for Web3 applications.
    • Relayer Node: The Relayer Node enables clients to interact with the decentralized network. It utilizes HTTP for SDP signaling and WebRTC data channels on the front-facing API while communicating with Resolver nodes through gRPC requests.
    • Resolver: Resolver application serves as a lowest-level endpoint in the p2p-network architecture. It processes requests received from the relayer and forwards them to the API(s) that it wraps.
    • LP Hub BackRunner

Price Discovery

AdapterTypeMethodSupported PairsParameters
ChainlinkOracleExternalPushProvider feedsfeed, max staleness
ChronicleOracleExternalPushProvider feedsfeed, max staleness
PythOracleExternalPullProvider feedsfeed, max staleness, max confidence interval
RedstoneCoreOracleExternalPullProvider feedsfeed, max staleness, cache ttl
LidoOracleOnchainRatewstETH/stETH-
LidoFundamentalOracleOnchainRatewstETH/ETH-
UniswapV3OracleOnchainTWAPUniV3 poolsfee, twap window
PendleOracleOnchainTWAPPendle marketspendle market, twap window
RateProviderOracleOnchainRateBalancer rate providersrate provider
FixedRateOracleOnchainRateAnyrate

NEAR Integration

Documentation

NEAR Integration

Prize Streams

🍾 Expand Limit Order Protocol ⸺ 10,000 x 3, 3500 x 4 )

1inch Limit Order Protocol is an onchain orderbook that can be extended to do much more. Build advanced strategies and hooks for the 1inch Limit Order Protocol like options, concentrated liquidity, TWAP swaps, etc.

Qualification Requirements:

  • Onchain execution of strategy should be presented during the final demo
  • Custom Limit Orders should not be posted to official Limit Order API
  • Consistent commit history should be in the GitHub project. No low or single-commit entries allowed!

Stretch goals (not hard requirements):

  • UI

🌐 Extend Fusion+ to Near ⸺ 12,000, 5,000, 4,000, $3500)

Build a novel extension for 1inch Cross-chain Swap (Fusion+) that enables swaps between Ethereum and Near.

Qualification Requirements:

  • Preserve hashlock and timelock functionality for the non-EVM implementation
  • Swap functionality should be bidirectional (swaps should be possible to and from Ethereum)
  • Onchain (mainnet or testnet) execution of token transfers should be presented during the final demo

Stretch goals (not hard requirements):

  • UI
  • Enable partial fills
  • Relayer and resolver

🔗 Best 1inch Fusion+ Solver Built with NEAR's Shade Agent Framework ⸺ 5000)

Build a decentralized solver that integrates with 1inch Fusion+ for cross-chain swaps using NEAR's Shade Agent Framework and Trusted Execution Environment.

There is an existing decentralized NEAR Intents solver here:

It listens for intents, generates quotes, and submits them for execution on NEAR Intents. Your task is to build a similar system that works with 1inch Fusion+ and its meta-order format. Make sure the solver is created using NEAR’s Shade Agent Framework and is deployed in a Trusted Execution Environment.

The Shade Agent Framework allows you to build decentralized solvers, enabling users to delegate and provide liquidity to solvers without requiring trust that the solver will behave correctly or having to set up their own solver.

Qualification Requirements:

Your solver must listen for quote requests (mocked or real), produce valid 1inch Fusion meta-orders using NEAR's Chain Signatures, include comprehensive documentation with setup instructions, and demonstrate end-to-end functionality. Bonus points for modular architecture that extends to other protocols.