Backd contest - antonttc's results

Maximize the power of your assets and start earning yield

General Information

Platform: Code4rena

Start Date: 21/04/2022

Pot Size: $100,000 USDC

Total HM: 18

Participants: 60

Period: 7 days

Judge: gzeon

Total Solo HM: 10

Id: 112

League: ETH

Backd

Findings Distribution

Researcher Performance

Rank: 20/60

Findings: 3

Award: $522.45

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

Labels

bug
duplicate
2 (Med Risk)
reviewed

Awards

70.085 USDC - $70.08

External Links

Lines of code

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/vault/EthVault.sol#L28

Vulnerability details

Impact

User funds can be locked by using a smart contract wallet with inefficient callback, or by future hardforks that change the gas consumption.

address.transfer has been suggested to deprecate by most auditors, because of the potential OOG error. However, payable(address).transfer is still use heavily through out the codeabase.

Reference: https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/

use call instead:

(bool success, ) = msg.sender.call.value(amount)(""); require(success, "Transfer failed.");

#0 - chase-manning

2022-04-28T11:41:03Z

Duplicate of #52

Findings Information

🌟 Selected for report: hubble

Also found by: TrungOre, antonttc, csanuragjain, gs8nrv, rayn, reassor

Labels

bug
2 (Med Risk)
resolved
sponsor confirmed
reviewed

Awards

293.0606 USDC - $293.06

External Links

Lines of code

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/access/RoleManager.sol#L155

Vulnerability details

Impact

The function doesn't remove the address from _roleMembers[role] set, which will mess up with the roleCount

Proof of Concept

Tools Used

_roles[role].members[account] = false; _roleMembers[role].remove(account);

#0 - gzeoneth

2022-05-07T17:19:50Z

Low probability and asset will not be lost directly. Judging this and all duplicates as Med Risk.

#1 - gzeoneth

2022-05-08T19:07:28Z

I believe #83 described this better.

#2 - chase-manning

2022-05-11T14:56:46Z

Awards

159.3125 USDC - $159.31

Labels

bug
QA (Quality Assurance)
resolved
sponsor confirmed
reviewed

External Links

Lines of code

https://github.com/code-423n4/2022-04-backd/blob/c856714a50437cb33240a5964b63687c9876275b/backd/contracts/oracles/ChainlinkUsdWrapper.sol#L56

Vulnerability details

Impact

The current code returns the following:

return (roundId_, (answer_ * _ethPrice()) / 1e8, startedAt_, updatedAt_, answeredInRound_);

If we're wrapping an asset that's relatively stable to eth price, the answer here might not be updated constantly. By returning the startedAt of the last answer update, it's possible that this answer be considered "stale" from the protocol.

It's better to return the new updatedAt_ at the greater of the two:

  • updatedAt_ from eth oracle,
  • updatedAt_ from the asset oracle

This way, if asset/eth is unchanged for a while, but there's a eth price move, we capture the correct updatedAt timestamp

#0 - gzeoneth

2022-05-09T14:55:43Z

I believe this is low risk since it can have benefit do consider the price is stale when any of the 2 price is not updated.

#1 - gzeoneth

2022-05-09T14:56:22Z

Considering as warden's QA report.

#2 - JeeberC4

2022-05-09T16:20:01Z

Preserving original title as warden did not submit a QA Report and issue was downgraded by judge: Bad updatedAt returned by ChainlinkUsdWrapper.latestRoundData

#3 - chase-manning

2022-05-11T14:56:17Z

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