-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Handle
jonah1005
Vulnerability details
Impact
FloatToken would revoke staker's permission if msg.sender == stakerAddress.
In initializeFloatToken the contract would first grant roles to stakerAddress and than revokemsg.sender's permissions. The contract would be left with no privileged address if stakerAddress == msg.sender.
Proof of Concept
Tools Used
None
Recommended Mitigation Steps
function initializeFloatToken(
string calldata name,
string calldata symbol,
address stakerAddress
) external initializer {
initialize(name, symbol);
renounceRole(DEFAULT_ADMIN_ROLE, msg.sender);
renounceRole(MINTER_ROLE, msg.sender);
renounceRole(PAUSER_ROLE, msg.sender);
_setupRole(DEFAULT_ADMIN_ROLE, stakerAddress);
_setupRole(MINTER_ROLE, stakerAddress);
_setupRole(PAUSER_ROLE, stakerAddress);
}Reactions are currently unavailable