feat: 4055 Implement Owner Management for Smart Contracts #5655
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.
Description
This PR implements a secure mechanism to transfer and manage the OWNER role in Guardian smart contracts to address security audit findings (#4055).
Access.sol(proposeOwner,claimOwner,removeOwner)propose-owner,claim-owner,remove-owner)Related issue(s)
Fixes #4055
Notes for Reviewer
Why Two-Step Ownership Transfer?
The implementation uses a two-step ownership transfer pattern (propose + claim) instead of direct transfer for the following security reasons:
Prevents accidental transfers: Direct ownership transfer to an incorrect address (typos, copy-paste errors) would result in permanent loss of contract control. The two-step pattern requires the new owner to actively claim ownership, confirming they have access to the destination address.
Validates recipient capability: The claim step verifies that the new owner can actually execute transactions, ensuring they have the private key and proper account setup.
Provides recovery window: If an owner accidentally proposes the wrong address, they can simply propose a different address to overwrite the pending owner before the claim occurs.
Industry standard: This pattern is widely adopted in production contracts (OpenZeppelin's
Ownable2Step, major DeFi protocols) as a security best practice.Security Constraints
pendingOwneris cleared after successful claim (prevents replay)Backwards Compatibility
Checklist