Badger-Finance / strategy-convex-staking-optimizer

GNU Affero General Public License v3.0
10 stars 8 forks source link

Fee change test #10

Closed sajanrajdev closed 2 years ago

sajanrajdev commented 2 years ago

This PR includes changes to test the parameters change requested on the following badger-ape ticket https://github.com/Badger-Finance/badger-ape/issues/222

It calls the following on the strategies, both for the freshly deploy test and on the deployed strategies before migration on the migration test live:

strategy.setAutoCompoundingPerformanceFeeGovernance(0, {"from": governance})
strategy.setPerformanceFeeGovernance(2000, {"from": governance})

Additionally, the appropriate checks were added to the resolver. The changes make the strategy charge 0% instead od 10% fee on the generated want and 20% instead of 10% on the vault tokens obtained (bveCVX and vcvxCRV). All tests are passing with the changes, specially the migration live tests (first run failed for Tricrypto2 due to having an expired rewardpool):

image

The reset to the rewards pool was added at the beginning of the test and it passes now:

image

Should these changes be approved, they can be executed by ops_deployer2 before delegating governance of the strategies to the dev_multisig.

Use the following to run migration live tests:

 brownie test tests/test_strategy_migration_live.py -s
sajanrajdev commented 2 years ago

Here is an example of a harvest with the fee changes: image