Ondo Finance contest - 0x5rings's results

Institutional-Grade Finance. On-Chain. For Everyone.

General Information

Platform: Code4rena

Start Date: 11/01/2023

Pot Size: $60,500 USDC

Total HM: 6

Participants: 69

Period: 6 days

Judge: Trust

Total Solo HM: 2

Id: 204

League: ETH

Ondo Finance

Findings Distribution

Researcher Performance

Rank: 47/69

Findings: 1

Award: $36.24

QA:
grade-b

🌟 Selected for report: 0

🚀 Solo Findings: 0

Consider using a chainId and nonce as part of the ERC712 Permit of addKYCAddressViaSignature

Description: without using a chainID and a nonce the user is suspectible to replay attacks. In two scenarios.

  • replay attacks from other chain / networks as the signature can be replayed (especially without a nonce)
  • If admin removesKYCAdderess after already approving the KYC (given the same message can be replayed as we're not iterating just a bool check)

Code: https://github.com/code-423n4/2023-01-ondo/blob/f3426e5b6b4561e09460b2e6471eb694efdd6c70/contracts/cash/kyc/KYCRegistry.sol#L93-L94

Mitigation:

  • include nonce and chainID to the structHash

Inconsistent use of pragma: pragma solidity 0.6.12; // @audit - old pragma, upgrade >= 0.8.X (and fixed the version no floating) Code: https://github.com/code-423n4/2023-01-ondo/blob/f3426e5b6b4561e09460b2e6471eb694efdd6c70/contracts/lending/OndoPriceOracle.sol#L15-L16

Mitigation: fix the pragma version to >= 0.8.X


zero address check on comptroller

code: https://github.com/code-423n4/2023-01-ondo/blob/f3426e5b6b4561e09460b2e6471eb694efdd6c70/contracts/lending/compound/Comptroller.sol#L125-L126

Mitigation: check if _admin != address(0)

#0 - c4-judge

2023-01-23T12:39:23Z

trust1995 marked the issue as grade-b

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