Skip to content

Fix bug in convex yield collection#842

Merged
DanielVF merged 7 commits into
masterfrom
DanielVF/convexYieldCollect
Dec 3, 2021
Merged

Fix bug in convex yield collection#842
DanielVF merged 7 commits into
masterfrom
DanielVF/convexYieldCollect

Conversation

@DanielVF
Copy link
Copy Markdown
Contributor

@DanielVF DanielVF commented Nov 29, 2021

What this PR Does

  1. We weren't actually collecting convex rewards. This fixes that.
  2. The vault can currently only sell one token per strategy, and must have an oracle. Since there is not currently an oracle for CVX, this sets the strategy reward token to CRV which we can sell.
  3. The address for CVX was set incorrectly to the LP token for the convex three pool. Fixed to be be CVX.
  4. Tests were not testing that we collected rewards from upstream. Fixed.

Checklist

If you made a contract change, make sure to complete the checklist below before merging it in master.

Refer to our documentation for more details about contract security best practices.

Contract change checklist:

  • Code reviewed by 2 reviewers. See template and example.
  • Unit tests pass
  • Slither tests pass with no warning
  • Echidna tests pass if PR includes changes to OUSD contract (not automated, run manually on local)

@DanielVF
Copy link
Copy Markdown
Contributor Author

DanielVF commented Dec 2, 2021

Fork testing:

image

Copy link
Copy Markdown

@franckc franckc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DanielVF DanielVF merged commit 81fe0a9 into master Dec 3, 2021
@DanielVF DanielVF deleted the DanielVF/convexYieldCollect branch December 3, 2021 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants