Predictive Model for Borrowing Cost of Popular DeFi Protocols | Algovera | Defi Squad - Save on Borrowing Interest Payments for Stable Coins | Round 17

Project Name

Predictive Model for Borrowing Cost of Popular DeFi Protocols

Project Category

Build & Integrate

Proposal Earmark

New Outreach

Proposal Description

Project Description

We are in the most exciting stage of the project, putting the top models to the test of predicting data not seen before! This will reveal the realistic performance of the models in production and therefore let the most generalized model win! We will be testing our models on 2022 data.

For increased readability we are developing a web app to visually compare the savings in interest cost of using our models over a simple strategy of borrowing your favorite stable coin and rolling with the punches of the market.

We will also be starting to train models for the Aave protocol to see if the methodology of training models on Compound data generalizes across DeFi protocols!

Current Progress

Key Terms

Number of past timepoints - NTP = Days in the past

Time Window - TW = Days in the future

With 5 classification models we have 8,536 experiments varying in hyper parameter and feature selection methods. The next phase of the experiment is to test the top models, found below, on data the models haven’t seen yet, this will determine how well our models generalize.

We have chosen to focus on the Compound DeFi Protocol for the first models. The problem is defined by classifying whether DAI, USDT, or USDC will have the lowest mean borrowing rate on Compound in 7, 14, or 21 days. We approach this task by using features including each stable coin above and ETH’s borrowing rate, deposit rate, borrow volume, and supply volume. We leverage time windowing, for each feature by each token to expand our feature space, to incorporate a sequential nature into the dataset. The time intervals we use are 5 days NTP of the stable coins listed above to predict which stable coin to hold for the 7, 14, or 21 day TW.

Data Gathered

DeFi Protocol: Compound

Features: borrowing rate, deposit rate, borrow volume, and supply volume

Training Date Range: April 2021 - December 2021

Stable Coins: DAI, USDT, or USDC

Other Token: ETH

Predict: Which stable coin will have the lowest mean borrowing rate. Ethereum is only for expanding the feature space.

Different models: Use the 5 days NTP to predict which stable coin will have the lowest mean borrowing rate over 7, 14, or 21 days TW.

Current Model Performance: (5 days NTP - 7 day TW) models are predicted to save 1% to 2% on interest payments compared to keeping a single debt position with DAI, USDC, or USDT on the Compound Protocol.


Web App Walk Video: Loom | Free Screen & Video Recording Software

Strategy Image:


Picture of top 5 models for NTP 5 -TW 7:

Defi Model: GitHub - AlgoveraAI/DeFi-borrowing-cost-prediction: Machine learning for predicting the borrowing cost across different protocols

Defi App: GitHub - VintageGold/DefiApp: Web App Compare Models

Grant Deliverables

Publish Compound 2021 and 2022 datasets to Ocean’s data marketplace

Test models trained on the Compound DeFi protocol on unseen data

Publish the top 3 models to Ocean’s algorithm marketplace

Create a web app to interact with model predictions

Gather data for the Aave protocol and start training models

Project Description

Project Description

We aim for DeFi dApps to use our models’ insights to determine what stable coin to borrow on which DeFi protocol. Less interest payments means more gains kept and therefore our models aim to predict over the time window of 7, 14, or 21 days which stable coin will have the lowest mean borrowing rate. Currently we focus on the Compound Protocol and the stable coins included are DAI, USDC, and USDT, but we are looking to expand on other DeFi protocols and stable coins.

In bear or bull season our models have a strong use case. In a bear market, collateral are stagnant or falling. In the case of stagnation, it is important to minimize the interest payments accumulating as gains aren’t increasing at the same or higher rate than the borrowing interest. In a bull market, maximizing the leverage or other risky positions with inexpensive debt allows for more gains to be kept and not paid to the lender.

Final Product

Save users on interest payments in 7, 14, or 21 day increments across Defi. Use the app to see the predictions and make debt swap adjustments. Or purchase the dataset and algorithm on Ocean’s marketplace and perform the analysis yourself.

Value Add Criteria

This project provides value to Ocean's data marketplace by publishing reliable datasets to Ocean's data marketplace and publishing models that can help Ocean users save on interest payments on Compound. This could therefore drive usage to Ocean users and possibly attract new users, as to generate predictions a user would need to purchase the dataset and purchase the algorithm of choice on Ocean's marketplace. 

This project is viable because we have a dedicated team who has collaborated together for the past 3 months to build ML models and discuss the best ways to frame the problem.  In addition, we are in the last stages of testing our models on unseen Compound Protocol data, where we already know the datasource and have scripts to test our models.  We were formed out of Algovera so we have experience with the Ocean marketplace, but we are new users here. We hope to create a strong relationship with Ocean as a marketplace to increase exposure to datasets and algorithms from our DeFi related prediction models.

Core Team


Greg, Christian, Iago, Vintage Gold, Arshy

Funding Requested

Minimum Funding Requested

Wallet Address

Hi there,

Thank you for participating in OceanDAO Round 17!

Your proposal has been registered into the system and is already live for voting here:

We try to make your first grant easy to earn (you are registered in the New Entrant Earmark)

We would also recommend one (or all) of the following steps:

  1. Say hi to the community in #ocean-dao and share your proposal.:
  1. Voting period is 4 days, ending Monday, May 6, 23:59 UTC. Talk about your project and ask your community to vote as much as you can. We will share/retweet as much as we can.

  2. Say hi to the members of the #project-guiding WG and find your guide. They have experience in how best to propose and run OceanDAO projects:

  1. Attend a Town Hall or join a working group:
  1. Keep your project guide close, they are here to help you. Feel free to ask for a quick call, sharing-sessions, feedback, or contacts to other projects in the ecosystem: Discord

  2. If you win a grant, make sure to claim it yourself within 12 days(!) after voting period ended, right here:

  3. When BUIDLing with your grant, feel free to share your amazing updates here: Discord

  4. Welcome aboard! Reach out anytime if you have questions, either to me or in the Project Guiding Working Group. Enjoy yourself and build towards a #NewDataEconomy with us! :ocean::yin_yang::raised_hands:

Christian Casazza