Platform: Code4rena
Start Date: 14/06/2022
Pot Size: $100,000 USDC
Total HM: 26
Participants: 59
Period: 7 days
Judge: GalloDaSballo
Total Solo HM: 9
Id: 133
League: ETH
Rank: 48/59
Findings: 1
Award: $183.57
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: joestakey
Also found by: 0x1f8b, 0x29A, 0x52, 0xDjango, 0xNazgul, 0xf15ers, 0xmint, Bronicle, Dravee, Funen, JMukesh, Limbooo, MadWookie, Picodes, Ruhum, TerrierLover, TomJ, Tutturu, WatchPug, Waze, _Adam, asutorufos, c3phas, catchup, cccz, codexploder, cryptphi, csanuragjain, defsec, fatherOfBlocks, gzeon, hake, hansfriese, hyh, ignacio, k, nxrblsrpr, oyc_109, robee, sach1r0, saian, simon135, technicallyty, zzzitron
72.4555 USDC - $72.46
687.9945 CANTO - $111.11
Affected Lines: https://github.com/Plex-Engineer/manifest/blob/main/x/unigov/types/proposal.go#L63-L65
In the event that no LendingMarketMetadata
is provided, the ValidateBasic
call can still pass. This would forward the transaction and eventually waste processor space processing an invalid proposal.
test:
func TestLendingMarketProposal_ValidateBasic(t *testing.T) { p := LendingMarketProposal{ Title: "hi", Description: "there", } err := p.ValidateBasic() require.NoError(t, err) }
the test above passes, even though there is no metadata, producing a bogus govhandler.
More fields could be validated to stop bad proposal from coming through.
Affected Lines: https://github.com/Plex-Engineer/manifest/blob/main/x/unigov/types/proposal.go#L82-L89
Suggestion:
Error should exist and be returned where its scoped.
Affected lines: https://github.com/Plex-Engineer/manifest/blob/main/x/unigov/keeper/proposals.go#L23-L29
Suggested Change:
if m.GetPropId() == 0 { var err error m.PropId, err = k.govKeeper.GetProposalID(ctx) if err != nil { return nil, sdkerrors.Wrap(err, "Error obtaining Proposal ID") } }
#0 - GalloDaSballo
2022-08-03T23:38:24Z
I think the findings are valid but they are related to test files.
Will give you 1 Low finding