Predictive Model for Borrowing Cost of Popular DeFi Protocols

Grant 2 Funding

Name of Project: Predictive Model for Borrowing Cost of Popular DeFi Protocols

Proposal in one sentence: Help DeFi investors minimize the interest payments on DAI, USDT, and USDC and have an interactive web app

Data Gathered

DeFI Protocol: Compound

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

Training Date Range: January 1st, 2021 - December 14th, 2021

Stable Coins: DAI, USDT, or USDC

Other Tokens: ETH

Predict: Which stable coin will have the lowest borrowing rate

Different models: 7 day, 14 day, 21 day in the future prediction

Project Description

Everyone wants cheap debt and stable debt. These models aim to provide a user with the tools to be able to have the cheapest debt over 7, 14, or 21 days. The focus is on stable coins, as the pegs allow for a more simple debt position to predict.

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 racking up. For a bull market, these models help the user understand how to maximize their positions, so more gains are kept rather than go towards paying interest.

Progress

With 5 classification models we have around 180 preliminary models and over 1000 experiments of hyper parameter tuning for each model. 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.

Top 5 timesteps and 7 days time window!

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 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 to the learned on dataset. We predict the stable coin with the minimum borrowing rate over the last five dates to predict which stable coin will have the minimum borrowing 7, 14, or 21 days out.

Next Steps

We are in the most exciting stage of a project, putting the top models to the test of predicting data not seen before! This will reveal the realistic performance of the model in production and therefore let the most generalized model win! The data we will be using is all data up until realtime.

We will also be starting to train models for the Aave protocol to see if the models trained on Compound data generalize across DeFi protocols!

For increased readability and naive usability we are developing a web app to visually compare the true dollar impact of using our models.

Grant Deliverables

  • Test models on unseen data

  • Create an iteration of a web app to interact with model predictions

  • Gather data for the Aave protocol and start training models

Funding Requested: $1000

Squad: Arshy, Greg, Christian, Iago, Vintage Gold

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

Last Grant Deliverables:

[X] Develop first version of time series forecasting model for predicting borrowing cost

[ ] Publish borrowing cost dataset to the Ocean marketplace - Deemed too soon to publish

[ ] Publish algorithm to the Ocean marketplace - Deemed we rather the algorithm be tested on real data before we push a version to Ocean.

  1. https://ipfs.io/ipfs/bafybeigzpieshz2qhlkpdqitfj4cscnhnbmyujemoezzb6xqfcbwlh3btq
    2.https://lh6.googleusercontent.com/gLRfwSiNvNThaA9olMkVowDUyCpNQTvOPTbvE5FT3_PcbSUeheIrurf0kx8jEuWR6Z3FUFDcRVsVwgMMFoJ7PNYv5dJcVJGJyfzWo_abHNGbDQoFLs18QN-x_kNr78GEQ6PjQ4U
  2. First Iteration of App - GitHub - VintageGold/DeepDefiApp: Web App Compare Models
3 Likes
  1. IPFS link takes around 10 seconds to download the model results file

Video walk through of app: Loom | Free Screen & Video Recording Software

1 Like

Newest Video walk through of app - Loom | Free Screen & Video Recording Software