keep-network / tbtc-v2

Trustlessly tokenized Bitcoin everywhere, version 2
https://tbtc.network
GNU General Public License v3.0
65 stars 36 forks source link

Yearn Finance integration deployment #16

Open dimpar opened 3 years ago

dimpar commented 3 years ago

Refs: https://github.com/keep-network/tbtc-v2/issues/7

Team Members
Deployment Team TBD
Technical Wallet Team TBD
Community Multisig TBD
Communications TBD

Prerequisites

tBTC v2

Curve pool

Saddle pool

Code

Deploy smart contracts

All steps done by Deployment Team

Post-deploy actions

Package publication

Done by Deployment Team

Release notes

Done by Deployment Team

lukasz-zimnoch commented 3 years ago

Some remarks:

  1. Regarding vault names, Yearn has a naming convention. For Curve vault, the name should be: Curve tBTCv2 Pool yVault and for Saddle vault: Saddle tBTCv2 Pool yVault.

  2. In section Deploy smart contracts:

    • Deploy CurveVoterProxyStrategy in _vault parameter we should pass the crvTBTCv2 vault address
    • Deploy ConvexStrategy in _vault parameter we should pass the crvTBTCv2 vault address
    • Deploy SaddleStrategy in _vault parameter we should pass the saddleTBTCv2 vault address
  3. At the end of Deploy smart contracts section we should add strategies to their vaults using addStrategy method.

  4. In Post-deploy actions section we should add a point about running our own keeper bot or adding our strategies to the Keep3r network.

pdyraga commented 3 years ago

I see Technical Wallet Team and Community Multisig are mentioned in the issue description but I am not sure what would be their responsibilities. From the task list I see:

  • determine our governance address (0x..). This address can be probably used as a guardian and rewards puller
  • determine our governance address (0x..). This address can be probably used as a guardian and rewards puller

What governance responsibilities should be covered?

dimpar commented 3 years ago

I see Technical Wallet Team and Community Multisig are mentioned in the issue description but I am not sure what would be their responsibilities.

This table was copied from the Coverage Pool v1.0.0 deployment scenario and I assumed that's a standard process of how we deploy to mainnet and left TBD to determine actual addresses if we need it. I wasn't sure of the purpose of each wallet and was hoping you can shed some light on it.

What governance responsibilities should be covered?

Governance would be able to call functions defined in our strategy contracts:

But all contracts that are implemented by us inherit from the BaseStrategy.sol which is a part of Yearn project and is in their repo. There are multiple functions there that can be called by governance like setting a strategiest, setting a keeper, doing a health check etc.

lukasz-zimnoch commented 3 years ago

I made a closer look at the governance addresses we need to use and here are the conclusions:

Vaults

According to that doc we need to deploy the vault using Yearn's Brownie script. Regarding addresses we should:

The current tBTC v1 vault has the same roles assignment.

Strategies

In this case we can first deploy the strategies using our Deployment account. Once we are ready we can transfer roles to the following addresses (it doesn't have to be done immediately):