Sturdy contest - z3s's results

The first protocol for interest-free borrowing and high yield lending.

General Information

Platform: Code4rena

Start Date: 13/05/2022

Pot Size: $30,000 USDC

Total HM: 8

Participants: 65

Period: 3 days

Judge: hickuphh3

Total Solo HM: 1

Id: 125

League: ETH

Sturdy

Findings Distribution

Researcher Performance

Rank: 49/65

Findings: 2

Award: $38.30

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

14.8433 USDC - $14.84

Labels

bug
duplicate
3 (High Risk)

External Links

Lines of code

https://github.com/code-423n4/2022-05-sturdy/blob/main/smart-contracts/LidoVault.sol#L142

Vulnerability details

Impact

LidoVault.sol#L141 In case of ETH withdraw request from user. after exchanging stETH -> ETH _withdrawFromYieldPool() send ETH to user but the require check is after the return of receivedETHAmount so this check won't happen. and in if call is going to fail it won't throw and the exchange won't revert. and user won't recieve the ETH.

swap the lines:

(bool sent, bytes memory data) = address(_to).call{value: receivedETHAmount}('');
- return receivedETHAmount;
require(sent, Errors.VT_COLLATERAL_WITHDRAW_INVALID);
+ return receivedETHAmount;

#0 - sforman2000

2022-05-18T03:10:08Z

Awards

23.4569 USDC - $23.46

Labels

bug
G (Gas Optimization)

External Links

Non Critical

Unused local variable in LidoVault.sol:

data is unused so it can be removed.

LidoVault.sol:91 (bool sent, bytes memory data) = LIDO.call{value: msg.value}(''); LidoVault.sol:140 (bool sent, bytes memory data) = address(_to).call{value: receivedETHAmount}('');

Remove data:

(bool sent, ) = LIDO.call{value: msg.value}('');
(bool sent, ) = address(_to).call{value: receivedETHAmount}('');

#0 - HickupHH3

2022-06-06T07:34:30Z

more of a gas opt IMO. changing it to a gas report

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