LIMIT ORDERS IMPLEMENTATION FOR OMOMO
OMOMO is a money market protocol on the NEAR blockchain with core features such as: lending/borrowing pools, leverage trading with covering positions from the borrowing pool.
WHAT WAS THE TASK?
The core idea was to implement limit orders with zero swap fees based on ref.finance – core DEX in the NEAR ecosystem.
Decentralized limit orders are a valuable trading tool that enables investors to buy or sell assets at a predetermined price. By setting a specific price point, traders can automate their trading strategy and effectively manage risk.
For OMOMO, we successfully implemented a limit orders system with zero swap fees, leveraging the concentrated liquidity feature of ref.finance. This addition to the platform provides users with increased control and flexibility when executing their trades, further enhancing their overall trading experience on the OMOMO platform.
The charts below demonstrate the part of business logic of the limit orders mechanics we implemented for OMOMO.
TRADING IS A CRUCIAL DIRECTION FOR BLOCKCHAIN PROJECTS. DISCOVER MORE ABOUT OUR DEVELOPMENT SOLUTIONS.
THE DEVELOPMENT PROCESS
Hackathons are always thrilling for a developer, but for us, it was twice more exciting and stressful because we had to win a hackathon and create an MVP product in one run.
As we simultaneously working on this project within hackathon limited in time, so the whole team of architect, blockchain, backend, and frontend engineers was working more than 18 hours during those days trying to keep a balance between features, stability, and architecture. There were no processes except the communicate-plan-do-test loop.
CHALLENGES WE CONFRONTED
Except for short hackathon deadlines, we also had to investigate and integrate our smart contracts with black-box API of ref.finance smart-contracts (at that point, there was no ref.finance SDK which brings little bit more light on how everything works under the hood). In order to tackle this challenge, we had to make all calculations manually and then implement a specific model to reproduce the mathematics of ref finance API. The black-box nature of the API meant that we had to trust our understanding of the inner workings of the protocol.
Despite these challenges, our team was able to successfully develop and implement the limit order system by thoroughly understanding the core concepts and ensuring that our model was accurate. In conclusion, we were able to provide a stable and effective solution that works seamlessly with the ref finance protocol.
We managed to achieve all our client’s aims and built an MVP for limit orders with zero swap fee based on ref.finance concentrated liquidity and won the hackathon ref.finance bounty. The code we wrote during the hackathon became a part of OMOMO leverage trading product.
Within our cooperation with OMOMO, the following achievements were made during the project:
- Successfully implemented limit orders with zero swap fees
- Integrated with ref.finance’s concentrated liquidity feature
- Provided users with increased control and flexibility in their trading strategies
In conclusion, our team’s dedication and expertise led to the successful development and implementation of a limit order system with zero swap fees for OMOMO. This accomplishment not only enhanced the trading experience for OMOMO users but also demonstrated our ability to tackle complex challenges in the blockchain and DeFi space.