stake.link

stake.link
DeFiHardhatBridge
27,500 USDC
View results
Submission Details
Severity: low
Valid

Use 2 step ownership instead of single step ownership

Summary

The ownership pattern implementation is linked to the Ownable contract where a single-step transfer is implemented.

This can lead to problem for all methods marked in onlyOwner throughout the codebase, in which some of have core protocol functionality.

Vulnerability Details

RewardsInitiator, SDLPoolCCIPController, RESDLTokenBridge, WrappedTokenBridge and LinearBoostController contract utilizes Ownable contract which is prone to error due to lack effective control.

Impact

Single-step transfer of ownership means, if a wrong address is passed during transferring of ownership it will result in loss of owner based role forever.

Tools Used

Manual Code Review

Recommendations

It is a best practice to use two-step ownership transfer pattern where ownership transfer gets to a "pending" state and the new owner should claim his new rights, otherwise the old owner will still has control of the contract.

Consider using OpenZeppelin's Ownable2Step contract.

Updates

Lead Judging Commences

0kage Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

ownable-2step

have a 2-step owner transfer

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.