Platform: Code4rena
Start Date: 05/10/2023
Pot Size: $33,050 USDC
Total HM: 1
Participants: 54
Period: 6 days
Judge: hansfriese
Id: 294
League: ETH
Rank: 39/54
Findings: 1
Award: $8.19
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: windhustler
Also found by: 0xhex, 0xta, JCK, K42, MatricksDeCoder, MrPotatoMagic, SAQ, SY_S, SovaSlava, aslanbek, d3e4, danb, hunter_w3b, lukejohn
8.1878 USDC - $8.19
Possible Optimization 1 = Use a Mapping specifically for Proxy Addresses:
mapping
after the first calculation.After Optimization:
mapping(address => address) public proxyAddresses; // Then update: function deployProxyDelegatorIfNeeded(address delegate) internal returns (address) { if (proxyAddresses[delegate] == address(0)) { // ... (existing code) proxyAddresses[delegate] = proxyAddress; } return proxyAddresses[delegate]; }
EXTCODESIZE
and KECCAK256
.Possible Optimization 2 = Better optimize loop in _delegateMulti():
burning
and minting
.After Optimization:
for (uint i = 0; i < maxLen; i++) { // ... (existing code) if (i < sourcesLength) { _burn(msg.sender, sources[i], amounts[i]); } if (i < targetsLength) { _mint(msg.sender, targets[i], amounts[i], ""); } }
#0 - c4-pre-sort
2023-10-13T13:42:41Z
141345 marked the issue as sufficient quality report
#1 - c4-judge
2023-10-24T17:03:31Z
hansfriese marked the issue as grade-b