Phuture Finance contest - fatherOfBlocks's results

Crypto index platform, that simplifies your investments through automated, themed index products.

General Information

Platform: Code4rena

Start Date: 19/04/2022

Pot Size: $30,000 USDC

Total HM: 10

Participants: 43

Period: 3 days

Judges: moose-code, JasoonS

Total Solo HM: 7

Id: 90

League: ETH

Phuture Finance

Findings Distribution

Researcher Performance

Rank: 29/43

Findings: 1

Award: $70.19

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

70.1915 USDC - $70.19

Labels

bug
G (Gas Optimization)

External Links

vToken.sol

  • L45 - onlyRole could be a function this way the gas is optimized.
  • L164 - _totalSupply - oldShares can be unckecked , create a variable and put it inside.
  • L164 - _assetBalance - availableAssets can be unckecked , create a variable and put it inside.

UniswapV2PathPriceOracle.sol

  • L34.49- i++ can be unchecked outside of the for, on the last line of the scope.

TopNMarketCapIndex.sol

  • L48 - i++ can be unchecked outside of the for, on the last line of the scope.
  • L55 - the require could be passed to line 51, so less code is executed.

PhuturePriceOracle.sol

  • L37 - onlyRole could be a function this way the gas is optimized.

ManagedIndex.sol

  • L30 - i++ can be unchecked outside of the for, on the last line of the scope.

BaseIndex.sol

  • L28 - onlyRole could be a function this way the gas is optimized.
  • L78 - i++ can be unchecked outside of the for, on the last line of the scope.

indexLogic.sol

  • L48 - the subtraction can be unchecked, since it is impossible for it to generate underflow.
  • L40.44.47.48.49 - create a variable and don't constantly call assets.at(i).
  • L61.63.67 - create a variable and don't constantly call inactiveAssets.at.at(i)
  • L88.117 - the subtraction can be unchecked, since it is impossible for it to generate underflow.
  • L103.110.123.127 - you could create a local variable and not be constantly calling it.

ManagedIndexReweightingLogic.sol

  • L39.40 - create a variable and don't constantly call assets.at(i).
  • L80.82 - the subtraction can be unchecked, since it is impossible for it to generate underflow.

TopNMarketCapIndexReweightingLogic.sol

  • L38.39 - create a variable and don't constantly call assets.at(i).
  • L71.96.98 - the subtraction can be unchecked, since it is impossible for it to generate underflow.
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