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+
-
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.
-
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
- Stop Loss and Take profit
- Both basic and trailing SL/TP orders
- ChainLink Example
- Order Creation Logic to Populate Order Extension Information
- Order Extensions : Extensions Code
- ERC-6909 extension similar to ERC1155PROXY.sol
- Resource Locking Functionality integrating with the-compact
- Price Discovery
- ChainCalculator.sol: Reference Implementation see Price Discovery codebases below.
- Interactions: Interactions are callbacks that enable the execution of arbitrary code, which is provided by the maker’s order or taker’s fill execution.
- ERC-6909 Settlement (including EIP-712 Signature Verification)
- BackRunning Of Order
- ERC-6909 extension similar to ERC1155PROXY.sol
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
- Jincubator Near Fusion+: NEAR Fusion+ Smart contracts
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
- ChainLinkCalculator
- Tycho Simulation TokenProxy
- SkySwap Oracle Manager
- Yolo Protocol Oracle
- Euler Price Oracle: See adapters below
Adapter | Type | Method | Supported Pairs | Parameters |
---|---|---|---|---|
ChainlinkOracle | External | Push | Provider feeds | feed, max staleness |
ChronicleOracle | External | Push | Provider feeds | feed, max staleness |
PythOracle | External | Pull | Provider feeds | feed, max staleness, max confidence interval |
RedstoneCoreOracle | External | Pull | Provider feeds | feed, max staleness, cache ttl |
LidoOracle | Onchain | Rate | wstETH/stETH | - |
LidoFundamentalOracle | Onchain | Rate | wstETH/ETH | - |
UniswapV3Oracle | Onchain | TWAP | UniV3 pools | fee, twap window |
PendleOracle | Onchain | TWAP | Pendle markets | pendle market, twap window |
RateProviderOracle | Onchain | Rate | Balancer rate providers | rate provider |
FixedRateOracle | Onchain | Rate | Any | rate |
NEAR Integration
- Jincubator Near Fusion+
- Cargo Near
- Donation Examples
- Frontend:
npx create-near-app@latest
- Solver manager and deployer https://github.com/jincubator-united-defi-2025/tee-solver
- Solver https://github.com/jincubator-united-defi-2025/near-intents-tee-amm-solver
- Near Intents
Documentation
- Limit order protocol v4: Technical documentation for 1nch Limit Order Protocol including Order Extensions
- 1inch OrderBook API: 1inch Orderbook API is using the 1inch Limit Order Protocol, which is a set of smart contracts that can work on any EVM-based blockchains. Key features of the protocol are extreme flexibility and high gas efficiency.
- 1inch Fusion+ (intent-based atomic cross-chain swaps): built on the cross-chain-sdk
- 1inch Cross-chain swaps - Fusion+ Tanner Moore
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:
- Solver manager and deployer https://github.com/Near-One/tee-solver/
- Solver https://github.com/think-in-universe/near-intents-tee-amm-solver/tree/feat/tee-solver
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.