Giter VIP home page Giter VIP logo

erc4626-stargate-vaults's Introduction

Yasp's EVM contracts

Welcome to the YaspFI EVM Contracts repository, which contains multiple vaults based on ERC-4626 for various DeFi protocols. This repository contains smart contracts that allow users to lock up their tokens and auto-compound rewards from different yield DeFi farms.

Structure

The repository contains the following structure:

  • src/providers/ This directory contains all of the vault implementations for various DeFi protocols. Each provider has its own subdirectory, which contains a contract that inherits from the Vault contract and implements provider-specific functionality. The providers currently supported include AaveV3, Stargate and Curve.
  • src/swappers/ contains all swappers that helps Vaults to swap reward tokens back to underlying. Currently we supports Uniswap V3 as an primary swap providers, but is Uniswap V3 is not supported on certain blockchain, we integrate local AMM (like PancakeSwap on BSC or SpookySwap on Fantom)
  • src/periphery/ This directory contains additional contracts that are used for peripheral functionality of the YaspFI platform.
  • test/ This directory contains all of the tests for the contracts in the repository. The tests are written in Solidity and use the Foundry. The tests cover all of the functionality of the contracts, including depositing tokens, withdrawing tokens, and auto-compounding rewards.
  • scripts/ includes all Solidity scripts that was used for deploying contracts via forge

Getting Started

To get started with using these contracts, you can clone the repository and build smart contracts via Foundry using this command:

forge build

If you have never used Foundry to develop smart contracts, we highly recommend trying this toolkit because of its coolness and convenience.

Testing

For each contract, a small set of tests is written to test the concept. Generalized property tests for ERC-4626 contracts have also been integrated, for which many thanks to A16Z for this repo.

forge test # Runs all tests
forge test -vvv --match-contract AaveV3VaultStdTest # runs only prop tests for AaveV3 Vault
forge test -vvv --match-contract StargateVaultStdTest # runs only prop tests for Stargate Vault

Deployed addresses

ETH Goerli

Optimism

Polygon

Arbitrum

Fantom

Avalanche

License

All the contracts in this repository are licensed under the MIT License. You can use these contracts for any commercial or non-commercial purpose, subject to the terms and conditions of the license.

erc4626-stargate-vaults's People

Contributors

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