Phuture Finance contest - z3s'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: 26/43

Findings: 2

Award: $92.25

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

62.9884 USDC - $62.99

Labels

bug
QA (Quality Assurance)

External Links

Non Critical

Use of Floating Pragma:

Contracts should be deployed with the same compiler version and flags that they have been tested with thoroughly. Locking the pragma helps to ensure that contracts do not accidentally get deployed using, for example, an outdated compiler version that might introduce bugs that affect the contract system negatively.

Lock the pragma version: use 0.8.7 instead of >=0.8.7.

Awards

29.2584 USDC - $29.26

Labels

bug
G (Gas Optimization)
sponsor disputed

External Links

Gas Optimizations

Use calldata instead of memory:

For external function's dynamic params, calldata is the cheapest location to use.

Change params memory to calldata

Use Custom Errors to save Gas:

Custom errors from Solidity 0.8.4 are cheaper than require messages. https://blog.soliditylang.org/2021/04/21/custom-errors/

++i use less gas than i++:

./contracts/UniswapV2PathPriceOracle.sol line: 34 for (uint i = 0; i < path.length - 1; i++) { line: 49 for (uint i = 0; i < path.length - 1; i++) {

++i can save some gas use it like other places in code.

#0 - jn-lp

2022-05-03T17:28:38Z

Data location must be "storage" or "memory" for constructor parameter.

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