Introducing Gelato’s Limit Order Library: DEX (Limit) Sells

Gelato
Gelato Network
Published in
4 min readJul 1, 2021

Although commonplace on Centralized Exchanges, Limit Orders have yet to reach wide adoption from Decentralized Exchange platforms. The reason DEX UIs have been lagging behind on implementing this feature is deeply rooted in the limitations of the EVM that make it hard to automate users' trades while also upholding DeFi’s core tenet of being non-custodial.

Gelato has researched and shipped systems to work around the EVM’s trustless automation limitations, without giving up user’s self-custody, since 2019. Yet to date, even AMMs such as Uniswap still offer no native Limit Order capability in the pure sense on their own UI. Many users on AMMs are still only presented with the option to go and buy at the current market rate, although it is worth mentioning that some of the bigger aggregators, such as 1inch, have made advancements on this front.

Gelato now sets out to obliterate this barrier for Decentralized Exchange developers with our brand new limit-orders-lib and limit-orders-react npm package releases. These two libraries provide an easy one-stop solution for developers to hook up native Limit Orders to their AMM or other DEX of choice in as little as 10 minutes! The smart contract components of the limit order system have been audited by Certik. The spectrum of tooling the library provides you with ranges from ready-made React Components for the quickest go-live imaginable, to React Hooks and, on the more customizable end, simple methods for interacting with the underlying Gelato Limit Order infrastructure. The library already works with well-known trading venues on Ethereum, Polygon (Matic), and Fantom (Fantom Foundation). Soon BSC and Layer 2s like Arbitrum will also be supported.

One key aspect of the Limit Orders system and the libraries are their subgraph component. Gelato bots use one canonical subgraph per supported network, in order to index new orders that are submitted by users of any UI that uses the library and also to monitor the order lifecycle from open to canceled or executed. As Gelato Legendary Member Luis (@gitpusha) recounts:

Using a subgraph from The Graph to create one global place where all data pertaining to Gelato’s Limit Order system is continuously stored, indexed, and easily queryable once again proved super useful for both integration developers frontend-side and Gelato bot maintainers backend-side.

First debuting on Sorbet Finance, Gelato’s Limit Order feature has already been executed by thousands of users looking to buy a dip or sell a top. Tapping into the deep liquidity of Uniswap and Quickswap, Sorbet has already transacted millions of dollars of volume in the past few months.

In addition, one of Fantom’s leading DEXs, Spooky Swap, became the first AMM to integrate limit orders natively on their platform thanks to Gelato’s limit order libraries.

About The Graph

The Graph is the indexing and query layer of the decentralized web. Developers build and publish open APIs, called subgraphs, that applications can query using GraphQL. The Graph currently supports indexing data from Ethereum, IPFS, and PoA with more networks coming soon. To date, over 16,000 subgraphs have been deployed by ~20,000 developers for applications, such as Uniswap, Synthetix, Aragon, Gnosis, Balancer, Livepeer, DAOstack, Aave, Decentraland, and many others.

If you are a developer building an application or Web3 application, you can use subgraphs for indexing and querying data from blockchains. The Graph allows applications to efficiently and performantly present data in a UI and allows other developers to use your subgraph too! You can deploy a subgraph or query existing subgraphs that are in the Graph Explorer. The Graph would love to welcome you to be Indexers, Curators, and/or Delegators on The Graph’s mainnet.

Join The Graph community by introducing yourself in The Graph Discord for technical discussions, join The Graph’s Telegram chat, or follow The Graph on Twitter! The Graph’s developers and members of the community are always eager to chat with you, and The Graph ecosystem has a growing community of developers who support each other.

The Graph Foundation oversees The Graph Network. The Graph Foundation is overseen by the Technical Council. Edge & Node and StreamingFast are two of the many organizations within The Graph ecosystem.

About Gelato Network

Gelato Network is web3’s automation network, enabling developers to automate & relay arbitrary smart contract executions on and across all EVM-based compatible blockchains such as Ethereum.

Gelato’s goal is to provide developers with a reliable, scalable & decentralized network to which they can outsource all of their web3 related DevOps operations.

Examples of which features are powered by Gelato include:

  • Limit Orders on PancakeSwap
  • Periodically updating debt ceilings on MakerDAO
  • Offering users gasless token claims on Connext
  • Automatically compounding yield farming vaults on Beefy Finance
  • Automating the breeding of new digital racehorse NFTs on ZED RUN
  • Rebasing of algorithmic stablecoins with Tomb Finance
  • Updating price oracles on Abracadabra


► Check out what we’ve been working on at 🍦https://gelato.network/🍦

Connect with us:

🐦 Twitter | 💬 Telegram | 📺 YouTube | 🔗Linktree

--

--