[CurvePB] Improve CurvePoolBoosterBribesModule#2789
Merged
clement-ux merged 18 commits intomasterfrom Feb 11, 2026
Merged
Conversation
- Use single `manageCampaign` call instead of 3 separate calls - Make bridge fee configurable instead of hardcoded - Send ETH from Safe via execTransactionFromModule instead of requiring pool boosters to hold ETH - Add NatSpec documentation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2789 +/- ##
==========================================
+ Coverage 39.02% 39.24% +0.22%
==========================================
Files 126 126
Lines 5825 5845 +20
Branches 1546 1547 +1
==========================================
+ Hits 2273 2294 +21
+ Misses 3550 3549 -1
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Add totalRewardAmounts and extraDuration parameters to the parameterized manageBribes overload, allowing per-pool control over reward amounts and campaign duration. The no-arg version retains the previous defaults (use all rewards, +1 period, no maxRewardPerVote update). Remove redundant onlyOperator modifier from internal _manageBribes. Update NatSpec.
Follow Solidity naming convention: all-caps is reserved for constants and immutables. Rename mutable storage array to lowercase. Prefix function parameters with underscore to avoid shadowing.
_removePoolBoosterAddress previously did a silent no-op when the address was not found. Now it reverts with "Pool not found" to prevent masking bugs in the caller.
Refactor _addPoolBoosterAddress to accept a single address and revert with "Pool already added" if it already exists, preventing double processing and double bridge fees. Switch addPoolBoosterAddress parameter to calldata for gas efficiency, consistent with removePoolBoosterAddress.
Replace the hardcoded 1000000 gas limit with a storage variable that can be set at construction and updated via setAdditionalGasLimit. Add corresponding event.
11e1d8c to
3d9c56d
Compare
Switch the parameterized manageBribes overload from memory to calldata for gas efficiency, avoiding unnecessary memory copies.
Pass the new constructor parameter (1000000) to match the updated CurvePoolBoosterBribesModule constructor signature.
Update the ABI and manageBribes call to match the new contract interface. Use the no-arg manageBribes() when skipRewardPerVote is true, and the 3-param overload with default totalRewardAmounts (max) and extraDuration (1) otherwise.
sparrowDom
previously approved these changes
Feb 9, 2026
Member
sparrowDom
left a comment
There was a problem hiding this comment.
Left a couple of comments inline
contracts/contracts/automation/CurvePoolBoosterBribesModule.sol
Outdated
Show resolved
Hide resolved
contracts/contracts/automation/CurvePoolBoosterBribesModule.sol
Outdated
Show resolved
Hide resolved
sparrowDom
previously approved these changes
Feb 10, 2026
sparrowDom
approved these changes
Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
manageCampaigncall: Replaces 3 separate calls (manageNumberOfPeriods,manageTotalRewardAmount,manageRewardPerVote) with a singlemanageCampaigncall, reducing gas costs and bridge fees.bridgeFee) with a setter, instead of being hardcoded to 0.001 ETH. Capped at 0.01 ETH.execTransactionFromModulevalue parameter, removing the requirement for each pool booster to hold ETH.manageBribes: The parameterized overload now acceptstotalRewardAmounts,extraDuration(uint8), andrewardsPerVoteper pool. The no-arg version retains sensible defaults (all available rewards, +1 period, no reward rate update).additionalGasLimit: Replaced the hardcoded1000000gas limit with a storage variable, constructor param, and setter. Capped at 10,000,000.POOLStopoolBoosters: Follow Solidity convention (all-caps reserved for constants/immutables) and avoid confusion with AMM pools._removePoolBoosterAddressnow reverts instead of silently no-oping when the address is not in the list._addPoolBoosterAddressreverts with "Pool already added" if the address already exists, preventing double processing._addPoolBoosterAddressreverts onaddress(0).calldatafor pool lists:addPoolBoosterAddressnow usescalldatainstead ofmemoryfor gas efficiency, consistent withremovePoolBoosterAddress.