Beginner FriendlyFoundryBridge
100 EXP
View results
Submission Details
Severity: medium
Invalid

Signers cannot be rotated out from the Bridge contract

Summary

The contract L1BossBridge.sol enables the Owner to designate a group of operators responsible for validating withdrawal requests. However, an identified gap in the contract's functionality is the absence of a feature to revoke an address from the list of operators.

Vulnerability Details

See above.

Impact

In situations where it becomes necessary to replace a signer within the list of authorized operators due to reasons such as a compromised wallet, malicious actor, or lost access to a private key, the current contract design lacks a mechanism for the owner to directly remove an address. The only available recourse is to redeploy the contract.

Tools Used

VSCode

Recommendations

Implement a function that allows the owner to rotate bridge operators/signers. One example of such implementation could be:

function removeSigner(address account) external onlyOwner {
delete(signers[account]);
}

Corresponding unit tests would look like this:

function testNonOwnerCannotRemoveSigner() public {
vm.expectRevert(abi.encodeWithSelector(Ownable.OwnableUnauthorizedAccount.selector, address(this)));
tokenBridge.deleteSigner(operator.addr);
}
function testSignerCanBeRemoved() public {
vm.startPrank(tokenBridge.owner());
Account memory dummy = makeAccount("dummy");
tokenBridge.setSigner(dummy.addr, true);
tokenBridge.deleteSigner(dummy.addr);
assertFalse(tokenBridge.signers(dummy.addr));
vm.stopPrank();
}
Updates

Lead Judging Commences

0xnevi Lead Judge
about 2 years ago
0xnevi Lead Judge about 2 years ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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