Open code423n4 opened 1 year ago
dmvt marked the issue as duplicate of #67
dmvt marked the issue as selected for report
vince0656 marked the issue as sponsor confirmed
dmvt marked the issue as satisfactory
JeeberC4 marked the issue as not a duplicate
JeeberC4 marked the issue as primary issue
Lines of code
https://github.com/code-423n4/2022-11-stakehouse/blob/main/contracts/liquid-staking/LiquidStakingManager.sol#L278-L284 https://github.com/code-423n4/2022-11-stakehouse/blob/main/contracts/liquid-staking/LiquidStakingManager.sol#L684-L692 https://github.com/code-423n4/2022-11-stakehouse/blob/main/contracts/liquid-staking/LiquidStakingManager.sol#L426-L492
Vulnerability details
Impact
Calling the
updateNodeRunnerWhitelistStatus
function by the DAO supposes to allow the trusted node runners to use and interact with the protocol whenenableWhitelisting
is set totrue
. However, since calling theupdateNodeRunnerWhitelistStatus
function executesrequire(isNodeRunnerWhitelisted[_nodeRunner] != isNodeRunnerWhitelisted[_nodeRunner], "Unnecessary update to same status")
, which always reverts, the DAO is unable to whitelist any trusted node runners. Because none of them can be whitelisted, all trusted node runners cannot call functions likeregisterBLSPublicKeys
when the whitelisting mode is enabled. As the major functionalities become unavailable, the protocol's usability becomes much limited, and the user experience becomes much degraded.https://github.com/code-423n4/2022-11-stakehouse/blob/main/contracts/liquid-staking/LiquidStakingManager.sol#L278-L284
https://github.com/code-423n4/2022-11-stakehouse/blob/main/contracts/liquid-staking/LiquidStakingManager.sol#L684-L692
https://github.com/code-423n4/2022-11-stakehouse/blob/main/contracts/liquid-staking/LiquidStakingManager.sol#L426-L492
Proof of Concept
Please add the following test in
test\foundry\LSDNFactory.t.sol
. This test will pass to demonstrate the described scenario.Tools Used
VSCode
Recommended Mitigation Steps
https://github.com/code-423n4/2022-11-stakehouse/blob/main/contracts/liquid-staking/LiquidStakingManager.sol#L280 can be updated to the following code.