Swivel v3 contest - 0xNineDec's results

The Capital-Efficient Protocol For Fixed-Rate Lending.

General Information

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

Swivel

Findings Distribution

Researcher Performance

Rank: 58/78

Findings: 1

Award: $44.50

🌟 Selected for report: 0

🚀 Solo Findings: 0

L: OPEN TODO'S

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.

L: NO ACCESSIBLE COVERAGE REPORT

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.

L: KEY ACTIONS PERFORMED BY THE ADMIN/SWIVEL SHOULD EMIT EVENTS

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

AuditHub

A portfolio for auditors, a security profile for protocols, a hub for web3 security.

Built bymalatrax © 2024

Auditors

Browse

Contests

Browse

Get in touch

ContactTwitter