Giter Club home page Giter Club logo

super-vaults's Introduction

Super-vaults

Repository contains different types of ERC4626 adapters/wrappers for non-standardized DeFi Vaults. We follow yield-daddy implementation for some of the AAVE & Compound forked protocols, adding reward harvesting, but we also provide a set of original adapters over protocols like Arrakis, Lido, Uniswap or Compound-V3.

A goal of this repository is to build a useful reference codebase to follow when implementing ERC4626 compatible adapters and vaults.

You can find individual README.md files in some of the protocol directories inside of /src expanding on adapter implementation. Some of the adapters are still considered experimental and/or not fully tested.

Disclaimer

Super-vaults is still work in progress. A lot of code has highly experimental nature and shouldn't be trusted in mainnet usage.

Build

Repository uses MakeFile to streamline testing operations.

Create .env file with RPC_URLs, otherwise tests will fail!

Copy contents of constants.env to your local .env file (Tests are run against forked state, we read target addresses from env)

make install

make build

make test

You can match individual test files with:

make test-aave for testing aave

make test-compound for testing compound

make test-steth for testing lido's stEth

(see MakeFile for more examples)

Slither

To run Slither over the specific file.

slither src/<PROTOCOL-DIR>/<NAME-OF-THE-VAULT>.sol --config-file slither.config.json

Structure

Each protocol is hosted inside of a separate directory. For a single protocol we expect to see many different types of ERC4626 Vaults and Wrappers/Adapters. Starting from the most basic, allowing only zapIn/zapOut to the non-ERC4626 Vault through the ERC4626 interface ending on "unique" ERC4626 implementations. If you plan on adding your own wrapper or standalone ERC4626 Vault, create a PR following existing root directory structure:

General view:

.
├── src
  ├── aave-v2
  ├── aave-v3
  ├── alpaca
  ├── arrakis
  ├── benqi
  ├── compound
  ├── geist
  ├── kycdao-4626      
  ├── lido
  ├── rocketPool
  ├── uniswap-v2
  ├── venus

Detailed view, inside of a protocol directory:

.
├── protocol-name
  ├── interface
  ├── test
      ├── ExampleERC4626Vault.t.sol
      ├── otherERC4626Vault.t.sol
  ├── other-implementation-1
  ├── next-implementation-2
  ├── ExampleERC4626Vault.sol

Each protocol directory should have its own test with coresponding entry in MakeFile. Follow established naming patterns. You can create additional directories inside of a protocol directory or host your Vaults together in root directory.

super-vaults's People

Contributors

shortdoom avatar 0xtimepunk avatar sidduhere avatar sg1-ra avatar sujithsomraaj avatar vikramarun 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.