Platform: Code4rena
Start Date: 02/06/2023
Pot Size: $100,000 USDC
Total HM: 15
Participants: 75
Period: 7 days
Judge: Picodes
Total Solo HM: 5
Id: 249
League: ETH
Rank: 11/75
Findings: 2
Award: $2,220.63
🌟 Selected for report: 0
🚀 Solo Findings: 0
102.2712 USDC - $102.27
https://github.com/code-423n4/2023-06-stader/blob/7566b5a35f32ebd55d3578b8bd05c038feb7d9cc/contracts/Auction.sol#L48 https://github.com/code-423n4/2023-06-stader/blob/7566b5a35f32ebd55d3578b8bd05c038feb7d9cc/contracts/Auction.sol#L62
Contract Auction.sol import PausableUpgradeable.sol and use modifier "whennotpaused" in createLot() and addBid() functions. But owner could not turn on or turn off pause mode, because contract dont have external functions for it. PausableUpgradeable give only internal functions _pause and _unpause. Developer need create external functions and override these.
Manual review
Add these functions
/** * @dev Triggers stopped state. * Contract must not be paused. */ function pause() external { UtilLib.onlyManagerRole(msg.sender, staderConfig); _pause(); } /** * @dev Returns to normal state. * Contract must be paused */ function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) { _unpause(); }
Copied from (correct contract, which have external functions) - https://github.com/code-423n4/2023-06-stader/blob/main/contracts/ETHx.sol
Other
#0 - c4-judge
2023-06-10T10:44:52Z
Picodes marked the issue as duplicate of #383
#1 - c4-judge
2023-07-02T09:44:23Z
Picodes marked the issue as satisfactory
102.2712 USDC - $102.27
Contract OperatorRewardsCollector.sol import PausableUpgradeable.sol and use modifier "whennotpaused" in claim() function. But owner could not turn on or turn off pause mode, because contract dont have external functions for it. PausableUpgradeable give only internal functions _pause and _unpause. Developer need create external functions and override these.
Manual review
Add these functions
/** * @dev Triggers stopped state. * Contract must not be paused. */ function pause() external { UtilLib.onlyManagerRole(msg.sender, staderConfig); _pause(); } /** * @dev Returns to normal state. * Contract must be paused */ function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) { _unpause(); }
Copied from (correct contract, which have external functions) - https://github.com/code-423n4/2023-06-stader/blob/main/contracts/ETHx.sol
Other
#0 - c4-judge
2023-06-10T10:44:48Z
Picodes marked the issue as duplicate of #383
#1 - c4-judge
2023-07-02T09:44:23Z
Picodes marked the issue as satisfactory
102.2712 USDC - $102.27
https://github.com/code-423n4/2023-06-stader/blob/7566b5a35f32ebd55d3578b8bd05c038feb7d9cc/contracts/StaderOracle.sol#L107 https://github.com/code-423n4/2023-06-stader/blob/7566b5a35f32ebd55d3578b8bd05c038feb7d9cc/contracts/StaderOracle.sol#L160 https://github.com/code-423n4/2023-06-stader/blob/7566b5a35f32ebd55d3578b8bd05c038feb7d9cc/contracts/StaderOracle.sol#L172 https://github.com/code-423n4/2023-06-stader/blob/7566b5a35f32ebd55d3578b8bd05c038feb7d9cc/contracts/StaderOracle.sol#L185 https://github.com/code-423n4/2023-06-stader/blob/7566b5a35f32ebd55d3578b8bd05c038feb7d9cc/contracts/StaderOracle.sol#L201 https://github.com/code-423n4/2023-06-stader/blob/7566b5a35f32ebd55d3578b8bd05c038feb7d9cc/contracts/StaderOracle.sol#L318 https://github.com/code-423n4/2023-06-stader/blob/7566b5a35f32ebd55d3578b8bd05c038feb7d9cc/contracts/StaderOracle.sol#L392 https://github.com/code-423n4/2023-06-stader/blob/7566b5a35f32ebd55d3578b8bd05c038feb7d9cc/contracts/StaderOracle.sol#L449
Contract StaderOracle.sol import PausableUpgradeable.sol and use modifier "whennotpaused" in submitExchangeRateData(),updateERFromPORFeed(),closeERInspectionMode(),disableERInspectionMode(),submitSocializingRewardsMerkleRoot(),submitValidatorStats(),submitWithdrawnValidators(), submitMissedAttestationPenalties() functions. But owner could not turn on or turn off pause mode, because contract dont have external functions for it. PausableUpgradeable give only internal functions _pause and _unpause. Developer need create external functions and override these.
See desciption
Manual review
Add these functions
/** * @dev Triggers stopped state. * Contract must not be paused. */ function pause() external { UtilLib.onlyManagerRole(msg.sender, staderConfig); _pause(); } /** * @dev Returns to normal state. * Contract must be paused */ function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) { _unpause(); }
Copied from (correct contract, which have external functions) - https://github.com/code-423n4/2023-06-stader/blob/main/contracts/ETHx.sol
Other
#0 - c4-judge
2023-06-10T10:44:43Z
Picodes marked the issue as duplicate of #383
#1 - c4-judge
2023-07-02T09:44:21Z
Picodes marked the issue as satisfactory
2118.3566 USDC - $2,118.36
When auction in progress, admin decide turn on pause mode in Auction contract. User see in mempool this tx and frontrun it, send tx with call to addBid() with best msg.value. After that, nobody could not make bid higher, because contract on pause. And, if pause mode will be longer than lot.endBlock, when admin send tx, which turn off pause mode, user will be winner of auction.
Manual review.
Delete modifier whenNotPaused() from function addBid()
Other
#0 - c4-judge
2023-06-12T21:33:30Z
Picodes marked the issue as duplicate of #226
#1 - c4-judge
2023-07-02T23:23:28Z
Picodes marked the issue as satisfactory