This admin can upgrade the contract, as there is set_code function.
Looking on how vault contract designed, the upgrade (set_code) can be done by role_owner, and if we look at the contract, there is a function transfer_role_owner to transfer this ownership.
Unlike the vault, this NominationAgent contract lack of this admin transfer ownership function
One can argue to just create another one and withdraw and unbound the agent holding, but this may cumbersome if required to change all nomination agents when there are large enough, moreover it can distrupt the functionality temporarily. Thus having a transfer admin function is reasonable.
Attack Scenario
Attachments
Proof of Concept (PoC) File
Revised Code File (Optional)
Recommendation
Consider to implement a transfer admin function in NominationAgent
Github username: -- Twitter username: -- Submission hash (on-chain): 0x8e1572818c9fca0d1e2df16885861ef4c0bfc65c1615bfbf48cee89fc44b4e9b Severity: low
Description: Description\
NominationAgent
hasadmin
variable which is set on constructorThis admin can upgrade the contract, as there is
set_code
function.Looking on how vault contract designed, the upgrade (
set_code
) can be done byrole_owner
, and if we look at the contract, there is a functiontransfer_role_owner
to transfer this ownership.Unlike the vault, this NominationAgent contract lack of this admin transfer ownership function
One can argue to just create another one and withdraw and unbound the agent holding, but this may cumbersome if required to change all nomination agents when there are large enough, moreover it can distrupt the functionality temporarily. Thus having a transfer admin function is reasonable.
Attack Scenario
Attachments
Proof of Concept (PoC) File
Revised Code File (Optional)
Recommendation
Consider to implement a transfer admin function in NominationAgent