MONEY MARKET PROTOCOL DEVELOPMENT FOR OMOMO
OMOMO is a money market protocol with native financial tools. It allows users to efficiently lend, borrow, trade with leverage, and utilize derivatives on NEAR.
The project provides users plenty of benefits, covering most of their financial needs. For instance, it enables various yield farming strategies and eliminates fees on the DEX, one of the main pain points for most crypto holders.
OMOMO backstory
Last year, we decided to expand the Rust expertise of the Blaize team and began researching the NEAR ecosystem and technology. Previously, we had only worked on Rust projects from the Solana ecosystem.
As a part of the research, we visited NEARcon 2021 and got inspired by the atmosphere and friendly community. This was the point of no return for the team – we knew we would love to work with the NEAR ecosystem.
Shortly after that, in December 2021, we were happy to present the idea of a lending/borrowing protocol during the Nearhack Hackathon in Kyiv. And our passion definitely shone through since we won a grant prize.
By the summer of 2022, we finalized the core functionality of the money market protocol development project, conducted a couple of internal smart contract audits, and created the OMOMO brand.
WHAT WAS THE TASK?
Create a permissionless borrow/lending protocol where all operations are executed on-chain and managed by smart contracts. Provide true decentralization where users own a fully leveraged position, using borrowing liquidity. Get rid of fees on the DEX and any slippage while swapping. And on top of that, provide fully DAO-governed asset tiers and protocol parameters.
PROJECT OVERVIEW
The OMOMO architecture is built in an agile and extendable way. Right now, we have two major features covering most DeFi needs for the NEAR ecosystem.
The tokenomics of the project is rather straightforward, as the dApp allows you to complete the following actions:
- supply valuable assets, earn dTokens and incentives on your deposit;
- use the supplied assets as collateral, still earn dTokens and incentives on your deposit, and borrow the assets of your choice to participate in the market.
The architecture of the lending/borrowing part is explained below.
There are a few parties involved in OMOMO architecture and functionality. The protocol has separate Markets contracts that wrap specific Assets and a Controller that is DAO governed and handles all cross-market interactions.
Markets are responsible for accepting supplies, providing borrows, and calculating the underlying model of supply and borrow interests. Meanwhile, the Controller coordinates all operations, including user flow, protocol configuration, and managing markets.
Another essential feature is Leveraged trading, which is built on top of the lending/borrow protocol and utilizes Ref.finance as an AMM.
OMOMO Leverage enables up to 3x leverage on long and short positions by borrowing assets from native borrow/lending protocol.
Let us see an example:
For instance, Alice deposits 1,000 USDC and opens a position with 2.5x Leverage. OMOMO borrows 1,500 USDC from the lending pool and swaps them for WNEAR on Ref.finance. After Alice closes the position, OMOMO Leverage swaps WNEAR back, repays the debt, and sends the rest to Alice, allowing her to make profits for a larger amount than she had.
THE DEVELOPMENT PROCESS
We had a powerful React/Rust team along with an experienced build on NEAR products. The whole work was divided into these milestones:
- Milestone 1: Lending borrow protocol 2022 Q1-Q2
- Developing tokenomics of multi-collateral lending-borrow
- Developing a standalone-market architecture
- Implementing basic user flows supply\borrow\repay\withdraw
- Implementing price feed and price oracle
- Implementing liquidation and liquidation bot
- Milestone 2: Rewards campaign 2022 Q2-Q3
- Developing tokenomics of rewards and incentives
- Implementing rewards campaigns with rewards in multiple tokens
- Implementing liquidation incentivization
- Milestone 3: Leveraged trading 2022 Q3-Q4
- NearCon 2022 Margin trading
- Metabuild III 2022 Limit orders over Ref.finance concentrated liquidity
In the near future, we have the fourth milestone planned – Public Release 2023 Q1-Q2.
NEED TO DEPLOY YOUR OWN SMART CONTRACT PLATFORM? GET TO KNOW MORE ABOUT OUR SMART CONTRACTS DEVELOPMENT SERVICES.
CHALLENGES WE CONFRONTED
- Due to the distributed nature of cross-contract calls in the NEAR ecosystems, managing cross-contract calls and state updates was a complex task and a challenge for our team.
- Another challenge was to integrate an AMM DEX (Ref) and our borrow/lending (OMOMO) protocol flows so that both of them work flawlessly in union.
RESULT
Since the moment we came up with the idea of OMOMO, the team has gone a long way. We currently have a user-friendly MVP that is not just a regular lending/borrowing protocol anymore but an entire hub for DeFi users in the NEAR ecosystem.
We are proud to say that OMOMO is:
- truly decentralized – all transactions are executed on-chain;
- using deep liquidity of borrowing pools for leveraged trading;
- empowering trading volume on Ref.finance.
There is much more to come for OMOMO, so make sure to stick around and stay on top of our news.