Giter Site home page Giter Site logo

curve-aave-loan-manager's Introduction

Curve <=> Aave Loan Manager

This project shows how to manage balances between Curve finance and Aave protocol. Usually yields on Curve were higher then on Aave (counting additional incentives) so it was profitable to put your crypto on Aave, then borrow stablecoins against it and transfer them to Curve 3pool.

The main contract is LoanManager and the user can interact with two main methods:

  • borrowAndStake() which gets a loan on Aave => deposit stables to Curve.
  • unstakeAndRepay() which withdraw from Curve => repay debt on Aave.

Contracts are designed in a way that assumes two actors: the owner and the worker The worker is a bot which scan blockchain state - Aave health factor, if health factor of the owner account is high then the bot can borrow stablecoins on behalf of the owner and stake them on Curve, make more profits. If health factor is low the opposit is happening (bot source code is not included here). Bot (worker) is only able to call these two functions nothing less nothing more.

The owner is EOA which private keys are not exposed in any way because they are not needed to constantly signing transactions as it is with the worker. So division on both roles gives some level of security. This is rather proof of concept than complete project, but it gives a view how "money legos" could work. I was also interested in implementing bot using chainlink keepers, but when project was originaly created, keepers were not available on Polygon chain.

curve-aave-loan-manager's People

Contributors

tomasz90 avatar

Stargazers

Mc01.eth avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.