Giter Site home page Giter Site logo

theaustrian1998 / camdaileverage Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 186 KB

A tool for leveraging DAI yield in AAVE using QiDao Protocol, in Polygon Network.

Solidity 60.00% JavaScript 35.73% Python 4.26%
ethereum smart-contracts polygon protocol defi

camdaileverage's Introduction

camDaiLeverage

A tool for leveraging DAI yield in AAVE using QiDao Protocol, in Polygon Network.

WARNING: this is highly experimental

Detailed non-technical info

Mechanism is as follow:

  1. Take a flash-swap in DAI
  2. Deposit DAI in AAVE
  3. Deposit amDai in camDai Vault (QiDaoProtocol)
  4. Deposit camDai as collateral in Vault (QiDaoProtocol)
  5. Borrow MAI
  6. Swap MAI for DAI
  7. Pay flash-swap

This tool is a Instadapp style protocol, you can call createNew() function to create a new contract that only your account (msg.sender) can manage.

Install

  • Clone repo

  • npm install
    
  • Create a secrets.json file, fill the blanks.

  • npx hardhat test tests/test.js
    

Functions

LeverageFactory:

  • createNew(): create a new camDaiLeverage contract
  • getContractAddresses(address account): get all contract addresses by account

camDaiLeverage:

  • doRulo(uint amount): do the loop
  • undoRulo(): undo the loop
  • transferTokens(address _tokenAddress): transfer any token to the owner, used for rescue tokens

camdaileverage's People

Contributors

theaustrian1998 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.