GithubHelp home page GithubHelp logo

iprotoni / aave-vault Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aave/aave-vault

0.0 1.0 0.0 3 MB

ERC4626 vault to hold aToken assets

License: Other

Shell 1.08% JavaScript 28.49% Ruby 2.65% Python 0.15% Julia 1.24% Nix 0.01% Makefile 0.08% Handlebars 0.07% Solidity 66.23%

aave-vault's Introduction

Foundry

Aave Vault

An ERC-4626 vault which allows users to deposit/withdraw ERC-20 tokens supported by Aave v3, manages the supply and withdrawal of these assets in Aave, and allows a vault manager to take a fee on yield earned.

Instructions

To compile/build the project, run forge build.

To run the test suite, run forge test.

Tests

Some of the tests rely on an RPC connection for forking network state. Make sure you have an .env file in the root directory of the repo with the following keys and values:

POLYGON_RPC_URL=[Your favourite Polygon RPC URL]
AVALANCHE_RPC_URL=[Your favourite Avalanche RPC URL]

The fork tests all use Polygon, except tests for claiming Aave rewards, which use Avalanche.

This test suite also includes a16z's ERC-4626 Property Tests, which are in the ATokenVaultProperties.t.sol file. These tests do not use a forked network state but rather use mock contracts, found in the test/mocks folder.

Deployment

To deploy the vault contract, first check that the deployment parameters in script/Deploy.s.sol are configured correctly, then check that your .env file contains these keys:

POLYGON_RPC_URL=xxx
MUMBAI_RPC_URL=xxx
ETHERSCAN_API_KEY=xxx
PRIVATE_KEY=xxx

Then run:

source .env

Then run one of the following commands:

Mumbai Testnet:

forge script script/Deploy.s.sol:Deploy --rpc-url $MUMBAI_RPC_URL --broadcast --verify --legacy -vvvv

Polygon Mainnet:

forge script script/Deploy.s.sol:Deploy --rpc-url $POLYGON_RPC_URL --broadcast --verify --legacy -vvvv

Audits

You can find all audit reports under the audits folder

License

All Rights Reserved © AaveCo

aave-vault's People

Contributors

bensparkscode avatar miguelmtzinf avatar zer0dot avatar foodaka 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.