GithubHelp home page GithubHelp logo

rodrigoieh / ribbon-v2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ribbon-finance/ribbon-v2

0.0 1.0 0.0 4.56 MB

Ribbon V2 for Theta Vaults

Solidity 31.75% TypeScript 68.19% JavaScript 0.03% Shell 0.03%

ribbon-v2's Introduction

Ribbon v2

Ribbon v2 is the next version for Ribbon's Theta Vault product. It brings several major improvements to the vault and makes the vault operations decentralized.

v2 changes include:

  • Decentralization of Theta Vault operations
  • Improved capital efficiency (100% of vault funds are utilized)
  • No more withdrawal fees, switching to performance fee
  • Meta-Vault strategies by composing multiple Theta Vaults

Getting Started

First, install the dependencies with yarn:

yarn install

Next, we need to populate the .env file with these values.
Copy the .env.example -> .env and fill out the value.
Reach out to the team if you need help on these variables. The TEST_URI needs to be an archive node.

TEST_URI=
MAINNET_URI=
KOVAN_URI=
ETHERSCAN_API_KEY=
KOVAN_MNEMONIC=
MAINNET_MNEMONIC=

Finally, we can run the tests:

# Run all the tests
yarn test

# Run specific test that matches the pattern -g
yarn run ts-mocha test/RibbonThetaYearnVault.ts --timeout 500000 -g 'rollToNextOption'

Deployment

Ribbon v2 uses hardhat-deploy to manage contract deployments to the blockchain.

To deploy all the contracts to Kovan, do

yarn deploy --network kovan

The deployment info is stored on disk and committed into Git. Next, we have to export out the deployed addresses in a parseable format for the frontend to use (JSON).

yarn export-deployments

Finally, we can verify the contracts on Etherscan:

yarn etherscan-verify --network kovan

Testing

Will run all tests on Ethereum mainnet and a subset of tests on Avax

yarn test

Runs Ethereum mainnet

yarn test:eth

Runs Avax testnet

yarn test:avax

ribbon-v2's People

Contributors

kenchangh avatar chudnov avatar fqlx avatar stevenwal 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.