We had a legacy helper in BaseVaultTest (and a duplicate in one of the test files) that computed aggregate percentages from their components. It had (documented) precision issues, which were resolved in the latest ProtocolFeeController code.
This makes minimal changes to remove these helpers and use the ProtocolFeeController itself for aggregate computation, so that it's consistent with what the system does. For the fuzz tests, there were still precision issues trying to set each to its full range, so in that case I had to fuzz the aggregate fee directly (bounding it, then manually adjusting for precision).
A more extensive change would be to always use the aggregate percentage natively, and not try to compute it.
Type of change
[ ] Bug fix
[ ] New feature
[ ] Breaking change
[ ] Dependency changes
[X] Code refactor / cleanup
[ ] Optimization: [ ] gas / [ ] bytecode
[ ] Documentation or wording changes
[ ] Other
Checklist:
[X] The diff is legible and has no extraneous changes
[X] Complex code has been commented, including external interfaces
[ ] Tests have 100% code coverage
[X] The base branch is either main, or there's a description of how to merge
Description
We had a legacy helper in
BaseVaultTest
(and a duplicate in one of the test files) that computed aggregate percentages from their components. It had (documented) precision issues, which were resolved in the latestProtocolFeeController
code.This makes minimal changes to remove these helpers and use the
ProtocolFeeController
itself for aggregate computation, so that it's consistent with what the system does. For the fuzz tests, there were still precision issues trying to set each to its full range, so in that case I had to fuzz the aggregate fee directly (bounding it, then manually adjusting for precision).A more extensive change would be to always use the aggregate percentage natively, and not try to compute it.
Type of change
Checklist:
main
, or there's a description of how to mergeIssue Resolution
Resolves #823 .