Platform: Code4rena
Start Date: 18/10/2022
Pot Size: $75,000 USDC
Total HM: 27
Participants: 144
Period: 7 days
Judge: gzeon
Total Solo HM: 13
Id: 170
League: ETH
Rank: 120/144
Findings: 2
Award: $0.00
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: Rolezn
Also found by: 0x1f8b, 0x52, 0x5rings, 0xNazgul, 0xSmartContract, 0xZaharina, 0xhunter, 0xzh, 8olidity, Amithuddar, Aymen0909, B2, Bnke0x0, Chom, Deivitto, Diana, Diraco, Dravee, Franfran, JC, Jeiwan, Josiah, JrNet, Jujic, KingNFT, KoKo, Lambda, Margaret, Migue, Ocean_Sky, PaludoX0, Picodes, Rahoz, RaoulSchaffranek, RaymondFam, RedOneN, ReyAdmirado, Shinchan, Tagir2003, Trust, Waze, Yiko, __141345__, a12jmx, adriro, ajtra, arcoun, aysha, ballx, bin2chen, bobirichman, brgltd, bulej93, catchup, catwhiskeys, caventa, cccz, cdahlheimer, ch0bu, chaduke, chrisdior4, cloudjunky, cryptostellar5, cryptphi, csanuragjain, cylzxje, d3e4, delfin454000, djxploit, durianSausage, erictee, fatherOfBlocks, francoHacker, gianganhnguyen, gogo, hansfriese, i_got_hacked, ignacio, imare, karanctf, kv, leosathya, louhk, lukris02, lyncurion, m_Rassska, malinariy, martin, mcwildy, mics, minhtrng, nicobevi, oyc_109, pashov, peanuts, pedr02b2, peiw, rbserver, ret2basic, rotcivegaf, rvierdiiev, ryshaw, sakman, sakshamguruji, saneryee, securerodd, seyni, sikorico, svskaushik, teawaterwire, tnevler, w0Lfrum
0 USDC - $0.00
Context:
return "HOLOGRAPH: bridge out failed";
L217return "HOLOGRAPH: unknown error";
L228return _operatorPods.length;
L619return _bondedAmounts[operator];
L706return _bondedOperators[operator];
L716return (Holographable.bridgeOut.selector, payload);
L83return (((gasPrice * (gasLimit + (gasLimit / 10))) * dstPriceRatio) / (10**10), nativeFee);
L175return ((gasPrice * (gasLimit + (gasLimit / 10))) * dstPriceRatio) / (10**10);
L194return (Holographable.bridgeOut.selector, abi.encode(from, to, tokenId, data));
327return (Holographable.bridgeOut.selector, abi.encode(from, to, amount, data));
310Recommendation:
Choose named return variable or return statement. It is unnecessary to use both.
Context:
Description:
According official solidity documentation functions should be grouped according to their visibility and ordered:
constructor
receive function (if exists)
fallback function (if exists)
external
public
internal
private
Recommendation:
Put the functions in the correct order according to the documentation.
Context:
Description:
Public functions can be declared external if they are not called by the contract.
Recommendation:
Declare these functions as external instead of public.
require(SourceERC721().beforeApprove(tokenOwner, to, tokenId));
L274require(SourceERC721().afterApprove(tokenOwner, to, tokenId));
L279require(SourceERC721().beforeBurn(wallet, tokenId));
L292require(SourceERC721().afterBurn(wallet, tokenId));
L296require(SourceERC721().beforeSafeTransfer(from, to, tokenId, data));
L361require(SourceERC721().afterSafeTransfer(from, to, tokenId, data));
L374require(SourceERC721().beforeApprovalAll(to, approved));
L387require(SourceERC721().afterApprovalAll(to, approved));
L392require(SourceERC721().beforeTransfer(from, to, tokenId, data));
L525require(SourceERC721().afterTransfer(from, to, tokenId, data));
L529require(SourceERC721().beforeOnERC721Received(_operator, _from, address(this), _tokenId, _data));
L660require(SourceERC721().afterOnERC721Received(_operator, _from, address(this), _tokenId, _data));
L668require(SourceERC20().beforeApprove(msg.sender, spender, amount));
L229require(SourceERC20().afterApprove(msg.sender, spender, amount));
L233require(SourceERC20().beforeBurn(msg.sender, amount));
L240require(SourceERC20().afterBurn(msg.sender, amount));
L244require(SourceERC20().beforeBurn(account, amount));
L255require(SourceERC20().afterBurn(account, amount));
L259require(SourceERC20().beforeApprove(msg.sender, spender, newAllowance));
L272require(SourceERC20().afterApprove(msg.sender, spender, newAllowance));
L276require(SourceERC20().beforeApprove(msg.sender, spender, newAllowance));
L331require(SourceERC20().afterApprove(msg.sender, spender, newAllowance));
L335require(SourceERC20().beforeOnERC20Received(account, sender, address(this), amount, data));
L348require(SourceERC20().afterOnERC20Received(account, sender, address(this), amount, data));
L356require(SourceERC20().beforeApprove(account, spender, amount));
L385require(SourceERC20().afterApprove(account, spender, amount));
L389require(SourceERC20().beforeSafeTransfer(msg.sender, recipient, amount, data));
L403require(SourceERC20().afterSafeTransfer(msg.sender, recipient, amount, data));
L408require(SourceERC20().beforeSafeTransfer(account, recipient, amount, data));
L437require(SourceERC20().afterSafeTransfer(account, recipient, amount, data));
L442require(SourceERC20().beforeTransfer(msg.sender, recipient, amount));
L483require(SourceERC20().afterTransfer(msg.sender, recipient, amount));
L487require(SourceERC20().beforeTransfer(account, recipient, amount));
L507require(SourceERC20().afterTransfer(account, recipient, amount));
L511🌟 Selected for report: oyc_109
Also found by: 0x040, 0x1f8b, 0x5rings, 0xNazgul, 0xSmartContract, 0xZaharina, 0xsam, 0xzh, 2997ms, Amithuddar, Aymen0909, B2, Bnke0x0, Deivitto, Diana, Dinesh11G, Franfran, JC, JrNet, Jujic, KingNFT, KoKo, Mathieu, Metatron, Mukund, Olivierdem, PaludoX0, Pheonix, Picodes, RaymondFam, RedOneN, ReyAdmirado, Rolezn, Saintcode_, Satyam_Sharma, Shinchan, Tagir2003, Tomio, Waze, Yiko, __141345__, adriro, ajtra, aysha, ballx, beardofginger, bobirichman, brgltd, bulej93, catchup, catwhiskeys, cdahlheimer, ch0bu, chaduke, chrisdior4, cryptostellar5, cylzxje, d3e4, delfin454000, dharma09, djxploit, durianSausage, emrekocak, erictee, exolorkistis, fatherOfBlocks, gianganhnguyen, gogo, halden, hxzy, i_got_hacked, iepathos, karanctf, leosathya, lucacez, lukris02, lyncurion, m_Rassska, martin, mcwildy, mics, nicobevi, peanuts, peiw, rbserver, ret2basic, rotcivegaf, ryshaw, sakman, sakshamguruji, saneryee, sikorico, skyle, svskaushik, tnevler, vv7, w0Lfrum, zishansami
0 USDC - $0.00
Context:
Description:
This can save 30-40 gas per loop iteration.
Recommendation:
Change:
for (uint256 i = 0; i < orders.length; ++i) { // Do the thing }
To:
for (uint256 i = 0; i < orders.length;) { // Do the thing unchecked { ++i; } }
Context:
Description:
Some gas can be saved by using an unchecked {} block if an underflow isn't possible because of a previous require() or if-statement.
Context:
Recommendation:
If a reference type function parameter is read-only, it is recommended to use calldata instead of memory because this provides significant gas savings. Since Solidity v0.6.9, memory and calldata are allowed in all functions regardless of their visibility type (ie external, public, etc).