Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Votium Briber adapter #411

Merged
merged 12 commits into from
Dec 31, 2021
Merged

Votium Briber adapter #411

merged 12 commits into from
Dec 31, 2021

Conversation

eswak
Copy link
Contributor

@eswak eswak commented Dec 23, 2021

Add a new VotiumBriber contract that can collect a rewards stream from the Tribal Chief and bribe with it.

I only did e2e tests because unit tests would just be testing my mock behaviors.

Open question : who do we empower to make the bribe calls ? Could be the OA multisig (not timelock), one of our addresses, a new multisig, a new multisig with timelock... Let's discuss on the forum & on discord.

@Joeysantoro
Copy link
Contributor

I changed it to TRIBAL_CHIEF_ADMIN_ROLE for now and we can have OA do it.

await contracts.stakingTokenWrapperBribeD3pool.harvest();
const briberBalanceAfter = await contracts.tribe.balanceOf(contracts.votiumBriberD3pool.address);
const bribeAmount = briberBalanceAfter.sub(briberBalanceBefore);
expect(bribeAmount).to.be.at.least('1');
Copy link
Contributor

Choose a reason for hiding this comment

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

There should be a higher quality test here that does a bit more than just checking the bribe amount is at least 1. With current allocation points, it should be thousands of tribe if you have 250 AP

contracts/pcv/convex/VotiumBriber.sol Show resolved Hide resolved
@Joeysantoro Joeysantoro dismissed stale reviews from kryptoklob and ElliotFriedman December 30, 2021 18:03

stale

ElliotFriedman
ElliotFriedman previously approved these changes Dec 30, 2021
Copy link
Contributor

@ElliotFriedman ElliotFriedman left a comment

Choose a reason for hiding this comment

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

I would add an IT that tests the pausing. Other than that, LGTM!

@Joeysantoro Joeysantoro merged commit e43ca46 into develop Dec 31, 2021
@Joeysantoro Joeysantoro deleted the feat/tc-votium-briber branch December 31, 2021 04: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.

4 participants