Backd contest - StyxRave'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: 16/60

Findings: 2

Award: $907.72

🌟 Selected for report: 0

🚀 Solo Findings: 0

Findings Information

🌟 Selected for report: shenwilly

Also found by: StyxRave, WatchPug, pauliax

Labels

bug
duplicate
2 (Med Risk)

Awards

703.5062 USDC - $703.51

External Links

Originally submitted by warden StyxRave in https://github.com/code-423n4/2022-04-backd-findings/issues/153, duplicate of https://github.com/code-423n4/2022-04-backd-findings/issues/49.

  • BkdTriHopCvx.sol decimalMultiplier assumes tokens have <= 18 decimals. Will always be 0 for tokens with more than 18 (which would be still ERC20 compliant).

#0 - JeeberC4

2022-05-13T19:53:50Z

Manually created required json file

Awards

204.213 USDC - $204.21

Labels

bug
QA (Quality Assurance)
resolved
reviewed

External Links

Hey, just some comments on things I understand as best practices / potential future proofing when extending this codebase. Didn't really have the time to go deep this round.

  • Controller.sol setInflationManager, addStakerVault and removePool should probably emit events indicating the changes made, as they are sensitive actions governance can make.

  • CvxCrvRewardsLocker.sol setTreasury does not check for zero address - uninitialized parameters by human error would end up with burned tokens if followed by any withdraw to treasury.

  • GasBank.sol withdrawUnused and withdrawFrom allow any action to withdraw from any account. Currently not a problem because only the TopUpAction exists, but there should probably be some kind of mapping between actions and the accounts they can affect / manage.

  • RoleManager.sol External functions are protected by the onlyGovernance modifier and call internal _grantRole / _revokeRole. removeGaugeZap should probably follow the same convention (currently not modifier protected, but instead calls public revokeRole, which is)

  • TopUpAction.sol

    TopUpActionLibrary's lockFunds doesn't use the addressProvider pattern existing in the codebase. Nothing ensures that stakerVaultAddress corresponds to token. Not currently dangerous because only TopUpAction::_lockFunds calls this function, appropiately getting the vault address from the addressProvider, but should probably future proof by doing it inside as the other functions in the library.

  • BkdTriHopCvx.sol decimalMultiplier assumes tokens have <= 18 decimals. Will always be 0 for tokens with more than 18 (which would be still ERC20 compliant).

  • StrategySwapper.sol _decimalMultiplier assumes tokens have <= 18 decimals. Will always be 0 for tokens with more than 18 (which would be still ERC20 compliant).

  • InflationManager.sol setMinter does not emit an event whilst changing the allowed minter address (a sensitive, governance protected action).

Cheers!

#0 - chase-manning

2022-04-28T10:16:07Z

I consider this report to be of particularly high quality

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