LI.FI contest - teryanarmen's results

Bridge & DEX Aggregation.

General Information

Platform: Code4rena

Start Date: 24/03/2022

Pot Size: $75,000 USDC

Total HM: 15

Participants: 59

Period: 7 days

Judge: gzeon

Id: 103

League: ETH

LI.FI

Findings Distribution

Researcher Performance

Rank: 44/59

Findings: 2

Award: $176.00

🌟 Selected for report: 0

🚀 Solo Findings: 0

Awards

113.5781 USDC - $113.58

Labels

bug
sponsor acknowledged
QA (Quality Assurance)

External Links

  1. Unlocked pragma in all contracts in scope should be fixed to 0.8.7 if that is the solidity compiler they were tested with to ensure contracts are not deployed with the wrong compiler version. Example

#0 - H3xept

2022-04-06T15:49:53Z

We internally decided that compiler pragma changes will be adopted after this audit resolves.

Awards

62.4172 USDC - $62.42

Labels

bug
G (Gas Optimization)

External Links

1. Functions visibility

2. Unnecessary storage retrieval

  • Summary: Storage values retrieved repeatedly in the same function can be cached to optimize gas usage.
  • Details: In _startBridge, 6 storage calls are made that can be replaced by chaching 1 variables, reducing gas usage significantly. For example, _bridge(hopData.asset).token can be replaced by s.hopBridges[hopData.asset] where s is stored in memory.
  • Github Permalinks: _startBridge, _bridge, and getStorage
  • Mitigation: Output of getStorage can be cahced in memory and later calls to _bridge can be replaced with queries to the Storage struct saved in the cache.

#0 - H3xept

2022-04-01T08:52:00Z

  1. Fixed by lifinance/lifi-contracts@26443af0142afdb131b6b3ab278fac29670b7b0e Duplicate of #197

#1 - H3xept

2022-04-11T10:56:06Z

Re Unnecessary storage retrieval

Duplicate of #196

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