Basin - DanielWang888's results

A composable EVM-native decentralized exchange protocol.

General Information

Platform: Code4rena

Start Date: 03/07/2023

Pot Size: $40,000 USDC

Total HM: 14

Participants: 74

Period: 7 days

Judge: alcueca

Total Solo HM: 9

Id: 259

League: ETH

Basin

Findings Distribution

Researcher Performance

Rank: 58/74

Findings: 1

Award: $17.52

QA:
grade-a

🌟 Selected for report: 0

🚀 Solo Findings: 0

Lines of code

https://github.com/code-423n4/2023-07-basin/blob/main/src/Well.sol#L632-L637

Vulnerability details

Impact

_tokens.length is not checked whether it is small than reserves.length or not. If tokens.length is small than reserves length, it will lead to revert on valid data.

Proof of Concept

https://github.com/code-423n4/2023-07-basin/blob/main/src/Well.sol#L632-L637

Tools Used

Manual Review

add _tokens.length check require statement on start of this function.

function _setReserves(IERC20[] memory _tokens, uint256[] memory reserves) internal {
  + require( _tokens.length == reserves.length, "Invalid Reserves Length");
	for (uint256 i; i < reserves.length; ++i) {
 		...
	}
}

Assessed type

Invalid Validation

#0 - c4-pre-sort

2023-07-12T04:43:46Z

141345 marked the issue as duplicate of #37

#1 - c4-pre-sort

2023-07-13T12:11:07Z

141345 marked the issue as duplicate of #294

#2 - c4-judge

2023-08-03T21:21:38Z

alcueca changed the severity to QA (Quality Assurance)

#3 - c4-judge

2023-08-05T21:29:56Z

alcueca marked the issue as grade-a

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