Platform: Code4rena
Start Date: 12/09/2022
Pot Size: $75,000 USDC
Total HM: 19
Participants: 110
Period: 7 days
Judge: HardlyDifficult
Total Solo HM: 9
Id: 160
League: ETH
Rank: 15/110
Findings: 1
Award: $483.57
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: Lambda
Also found by: 0x1f8b, 0x4non, 0x52, 0x5rings, 0xDanielC, 0xNazgul, 0xSmartContract, 0xbepresent, Anth3m, Aymen0909, B2, CRYP70, CertoraInc, Ch_301, Chom, ChristianKuri, CodingNameKiki, Deivitto, Funen, JC, JansenC, Jeiwan, KIntern_NA, MasterCookie, MiloTruck, Olivierdem, PaludoX0, R2, RaymondFam, ReyAdmirado, StevenL, The_GUILD, Tomo, Trust, V_B, __141345__, asutorufos, ayeslick, bin2chen, brgltd, bulej93, c3phas, cccz, ch0bu, cryptphi, csanuragjain, d3e4, delfin454000, djxploit, erictee, fatherOfBlocks, gogo, hansfriese, indijanc, ladboy233, leosathya, lukris02, malinariy, martin, pedr02b2, pfapostol, rvierdiiev, slowmoses, smiling_heretic, tnevler, wagmi
483.5676 USDC - $483.57
it is called only by _adjustVotingPower()
and it makes done checks for address()
File: main/contracts/party/PartyGovernance.sol if (newDelegate == address(0) || oldDelegate == address(0)) {
https://github.com/PartyDAO/party-contracts-c4/blob/main/contracts/party/PartyGovernance.sol#L931
https://github.com/PartyDAO/party-contracts-c4/blob/main/contracts/crowdfund/Crowdfund.sol#L464
it better to update the state after the check is CrowdfundLifecycle.Active
or not
File: /main/contracts/crowdfund/Crowdfund.sol totalContributions += amount;
https://github.com/PartyDAO/party-contracts-c4/blob/main/contracts/crowdfund/Crowdfund.sol#L411
finalize()
directlyIs it better to invoke finalize()
here? there is no need to wait for intel someone to invoke it directly
File: /main/contracts/crowdfund/AuctionCrowdfund.sol if (market.isFinalized(auctionId_)) { revert AuctionFinalizedError(auctionId_); } // Only bid if we are not already the highest bidder. if (market.getCurrentHighestBidder(auctionId_) == address(this)) { revert AlreadyHighestBidderError(); } // Get the minimum necessary bid to be the highest bidder. uint96 bidAmount = market.getMinimumBid(auctionId_).safeCastUint256ToUint96(); // Make sure the bid is less than the maximum bid. if (bidAmount > maximumBid) { revert ExceedsMaximumBidError(bidAmount, maximumBid); }
https://github.com/PartyDAO/party-contracts-c4/blob/main/contracts/crowdfund/AuctionCrowdfund.sol#L162-L164 https://github.com/PartyDAO/party-contracts-c4/blob/main/contracts/crowdfund/AuctionCrowdfund.sol#L172-L174
AuctionCrowdfund
after this check you need to check if the current bid is curntBid > maximumBid
if there is no bidder yet you need to check The minimum price for the first bid, starting the auction reservePrice > maximumBid
File: /main/contracts/crowdfund/AuctionCrowdfund.sol if (!market.auctionIdMatchesToken( opts.auctionId, address(opts.nftContract), opts.nftTokenId)) { revert InvalidAuctionIdError(); }