Conversation
|
Caution No labels are set. |
|
Caution No labels are set. |
|
Caution No labels are set. |
|
Caution No labels are set. |
|
Caution No labels are set. |
|
Caution No labels are set. |
|
Caution No labels are set. |
|
Caution No labels are set. |
|
Caution No labels are set. |
|
Caution No labels are set. |
|
Caution No labels are set. |
|
Caution No labels are set. |
|
Caution No labels are set. |
|
Caution No labels are set. |
|
Caution No labels are set. |
|
Caution No labels are set. |
|
Caution No labels are set. |
|
Caution No labels are set. |
|
@0x4007 This PR is ready for review |
|
Tip Hello, world! |
@gentlementlegen not sure why this sent so many consecutively this shouldn't happen ( @ryzhak I'll review when I'm on my computer |
0x4007
left a comment
There was a problem hiding this comment.
We should get more eyes on this.
There was a problem hiding this comment.
Pull Request Overview
This PR applies audit fixes for the staking functionality, addressing high and medium severity issues found during security review. The changes focus on improving reward calculations, preventing token overlap conflicts, and enhancing security through proper access controls.
- Implements mass pool updates when creating/updating pools to ensure accurate reward calculations
- Adds validation to prevent staking/reward tokens from overlapping with UbiquityPool collateral tokens
- Adds reentrancy protection and pause functionality to critical staking operations
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
LibStaking.sol |
Core staking logic updates including mass pool updates, collateral overlap checks, and treasury divider validation |
StakingFacet.sol |
Added security modifiers (whenNotPaused, nonReentrant) and simplified function signatures |
IStaking.sol |
Updated interface to match simplified function signatures and added documentation |
StakingFacet.t.sol |
Updated tests to match new function signatures and added new test cases for collateral overlap validation |
StakingFacet.fuzz.t.sol |
Updated fuzz tests with new function signatures and improved parameter bounds |
AaveAmo.t.sol |
Fixed test to use valid function call instead of empty call |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
zgo said they can take a look soon |
zgorizzo69
left a comment
There was a problem hiding this comment.
good job fixing the issues from the audit
I would only add one small test and assess if feasible to make setStakingRewardToken revert if there are pending rewards
This emanates from |
|
@ryzhak I guess the failed CI doesn't matter? |
|
@rndquu please resolve zgorizzo69's review comments- whether to implement or ignore is your decision |
All resolved, everything is kept "as is" |
Resolves #998
In particular applies changes from #998 (comment).
The
Check For Diamond Storage Changesworkflow is failing because of #992. Anyway it's safe to update the storage layout of theLibStakingsince it's not deployed yet.