Platform: Code4rena
Start Date: 12/07/2022
Pot Size: $35,000 USDC
Total HM: 13
Participants: 78
Period: 3 days
Judge: 0xean
Total Solo HM: 6
Id: 135
League: ETH
Rank: 58/78
Findings: 1
Award: $44.50
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: joestakey
Also found by: 0x1f8b, 0x52, 0xDjango, 0xNazgul, 0xNineDec, 8olidity, Avci, Bahurum, Bnke0x0, Chom, ElKu, Funen, GimelSec, JC, Junnon, Kaiziron, Meera, PaludoX0, Picodes, ReyAdmirado, Sm4rty, Soosh, Waze, _Adam, __141345__, ak1, aysha, benbaessler, bin2chen, c3phas, cccz, cryptphi, csanuragjain, defsec, exd0tpy, fatherOfBlocks, gogo, hake, hansfriese, itsmeSTYJ, jonatascm, kyteg, mektigboy, oyc_109, pashov, rbserver, rishabh, robee, rokinot, sach1r0, sashik_eth, scaraven, simon135, slywaters
44.4954 USDC - $44.50
Currently the Swivel.sol
contract has 17 open TODO comments pointing to non implemented features, comments or explanations.
It is highly advisable to check this before going live. Also, it is remarked that any breaking changes introduced by the implementations of the comments won't be part of this audit so they might need further reviews to check their security.
Besides from having a link within the project repo to get the test suite written mainly in Go, there is no documentation nor instructions about how coverage tests can be performed. It is advised having at least a 95% of contract testing coverage before deploying them to mainnet. Consider adding and making a coverage report accessible and document clearly how it can be ran.
The following functions do not emit events after they are called:
Swivel.setAdmin()
Swivel.withdraw()
Swivel.approveUnderlying()
Marketplace.setAdmin()
Marketplace.mintZcTokenAddingNotional()
Marketplace.burnZcTokenRemovingNotional()
Marketplace.transferVaultNotionalFee()
Marketplace.pause()
Among the functions mentioned before, there are a few events that are missing which are more important to emit than others. For example, the lack of emitted events while changing ownership or withdrawing ERC20 tokens from Swivel, as well as pausing the marketplace or transferring Notional fees are key actions that cannot pass unattended.
It is advisable to emit the respective events one the mentioned functions, having relevant indexed parameters on each event to allow offchain filtering.
#0 - robrobbins
2022-08-25T23:05:05Z
coverage numbers mean little and are easily gamed