Git Product home page Git Product logo

pooltogether-yearnv2-yield-source's Introduction

PoolTogether Brand


PoolTogether YearnV2 Yield Source

Coverage Status Coveralls built-with openzeppelin

PoolTogether Yield Source that uses Yearn V2 to generate yield by depositing the deposit token in any Yearn Vault that accepts that token.

Usage

This PoolTogether Yield Source is compatible for Yearn V2 Vaults with versions lower than 0.3.2 and higher than 0.3.4. This is due to a bug in the vaults' sandwich protection that lead to small temporary dips in share value. At the time of writing, vaults in prod that are not working with this integrations are:

Also, at the time of writing, no more Vaults with this bug are being deployed so all the future Vaults should be compatible.

Deployment

Follow Installation instructions.

yarn deploy <network_name>

The deployment script can be found in deploy/deploy.ts.

Development

Clone this repository and enter the directory.

Installation

Install dependencies:

yarn

This project uses Yarn 2, dependencies should get installed pretty quickly.

Env

We use direnv to manage environment variables. You'll likely need to install it.

Copy .envrc.example and write down the env variables needed to run this project.

cp .envrc.example .envrc

Once your env variables are setup, load them with:

direnv allow

Test

We use the Hardhat ecosystem to test and deploy our contracts.

To run unit tests:

yarn test

To run solhint and tests:

yarn verify

To run coverage:

yarn coverage

Mainnet fork

Before deploying, you can make sure your implementation works by deploying a Yield Source Prize Pool on a fork of Mainnet.

Start Mainnet fork in a terminal window with the command:

yarn start-fork

In another window, start the scripts to deploy and create a YearnV2 Yield Source Prize Pool, deposit USDC into it, send some profit to the Vault, award the prize and withdraw.

yarn deploy-fork && yarn run-fork

Contract Verification

Once deployment is done, you can verify your contracts on Etherscan by typing:

yarn verify <NETWORK_NAME>

Code quality

Prettier is used to format TypeScript code. Use it by running:

yarn format

Solhint is used to lint Solidity files. Run it with:

yarn hint

TypeChain is used to generates types for scripts and tests. Generate types by running:

yarn typechain

pooltogether-yearnv2-yield-source's People

Contributors

jmonteer avatar pierrickgt avatar kamescg avatar asselstine avatar aodhgan avatar

Stargazers

App Service avatar Thomas Erhel avatar jeevanpillay0000 avatar

Watchers

James Cloos avatar  avatar

Forkers

isabella232

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.