Platform: Code4rena
Start Date: 08/05/2023
Pot Size: $90,500 USDC
Total HM: 17
Participants: 102
Period: 7 days
Judge: 0xean
Total Solo HM: 4
Id: 236
League: ETH
Rank: 81/102
Findings: 1
Award: $56.63
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: brgltd
Also found by: 0x73696d616f, 0xAce, 0xSmartContract, 0xWaitress, 0xkazim, 0xnev, Aymen0909, BGSecurity, Bauchibred, Cayo, ChrisTina, Franfran, IceBear, Infect3d, Kose, Lilyjjo, PNS, RaymondFam, Sathish9098, Team_Rocket, Udsen, YakuzaKiawe, YoungWolves, berlin-101, bin2chen, btk, codeslide, fatherOfBlocks, frazerch, kodyvim, koxuan, lfzkoala, lukris02, matrix_0wl, nadin, naman1778, sashik_eth, tnevler, volodya, wonjun, yjrwkk
56.6347 USDC - $56.63
Venus QA report was done by martin and anonresercher, with a main focus on the low severity and non-critical security aspects of the implementation and logic of the project.
The following issues were found, categorized by their severity:
ID | Title | Severity |
---|---|---|
[NC-01] | Prefer battle-tested code over reimplementing common patterns | Non-Critical |
[NC-02] | Redundant check | Non-Critical |
[NC-03] | Event should be emitted for important state changes | Non-Critical |
[NC-04] | Event was emitted earlier | Non-Critical |
[NC-05] | Bad formatting | Non-Critical |
[NC-05] | Typos | Non-Critical |
Replace the nonReentrant
modifier in VToken with the nonReentrant from OpenZeppelin, since it is well-tested and optimized.
The setPoolRegistry
function can be called only by the owner, so it is unlikely to be called with address(0), but even if it happens it can be called again with correct data.
54: require(_poolRegistry != address(0), "ProtocolShareReserve: Pool registry address invalid"); 111: require(shortfallContractAddress_ != address(0), "Risk Fund: Shortfall contract address invalid"); 127: require(pancakeSwapRouter_ != address(0), "Risk Fund: PancakeSwap address invalid");
https://github.com/code-423n4/2023-05-venus/blob/main/contracts/RiskFund/RiskFund.sol
578: function healAccount(address user) external {
https://github.com/code-423n4/2023-05-venus/blob/main/contracts/Comptroller.sol
The AuctionRestarted
event is actually emitted before the _startAuction
, event emits should be moved after the creation. Otherwise, it might be incorrectly emitted.
283: emit AuctionRestarted(comptroller, auction.startBlock);
https://github.com/code-423n4/2023-05-venus/blob/main/contracts/Shortfall/Shortfall.sol
211: * @param comptroller Comptroller address(pool).
https://github.com/code-423n4/2023-05-venus/blob/main/contracts/RiskFund/RiskFund.sol
-- * @return proxyAddress The the Comptroller proxy address ++ * @return proxyAddress The Comptroller proxy address
https://github.com/code-423n4/2023-05-venus/blob/main/contracts/Pool/PoolRegistry.sol
#0 - c4-judge
2023-05-18T19:35:46Z
0xean marked the issue as grade-b