You can find general overview and docs on 1inch limit orders protocol here.
This repository contains a smart contract for EVM based blockchains (Ethereum, Binance Smart Chain, etc.), this contract is core part of 1inch limit order protocol.
Contract allows users to place limit orders, that later could be filled on-chain. Limit order itself is a data structure created off-chain and signed according to EIP-712.
Key features of the protocol is extreme flexibility and high gas efficiency that achieved by using following order types.
Extremely flexible limit order, can be configured with:
- Order execution predicate.
- Typical usage is checking that certain time stamp or block number. With this you can set certain expiration time.
- You can specify construct any predicate that you want, for example check that certain price is higher than oracle price, to implement stop loss or take profit strategies
- Helper function for asset price evaluation.
- Function that will allow to extract assets price from arbitrary on-chain source
- Callback, for to notify maker on order execution.
Gas optimized order with restricted capabilities suitable for market makers
- Support expiration time
- Support cancellation by order id
- RFQ Order could be filled only once
- Partial Fill is possible (once)
- ERC 20
- ERC 721
- ERC 1155
- Other token standards could be supported via external extension
You can find 1inch limit order protocol deployments here:
- Ethereum mainnet: 0x3ef51736315F52d568D6D2cf289419b9CfffE782
- BSC mainnet: 0xe3456f4Ee65E745A44EC3bcB83D0f2529D1b84Eb
- Polygon mainnet: 0xb707d89D29c189421163515c59E42147371D6857
- Kovan testnet: 0x94Bc2a1C732BcAd7343B25af48385Fe76E08734f
- Optimism Ethereum: 0xb707d89D29c189421163515c59E42147371D6857
You can find audit reports on etherscan and in the separate audit repository.
Plenty of utils that helps create & sign orders are available in our typescript utils library: