Platform: Code4rena
Start Date: 27/04/2022
Pot Size: $50,000 MIM
Total HM: 6
Participants: 59
Period: 5 days
Judge: 0xean
Id: 113
League: ETH
Rank: 35/59
Findings: 1
Award: $111.21
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: IllIllI
Also found by: 0x1337, 0x1f8b, 0xDjango, 0xf15ers, AuditsAreUS, BowTiedWardens, CertoraInc, Funen, GimelSec, MaratCerby, Ruhum, WatchPug, antonttc, berndartmueller, bobi, bobirichman, broccolirob, catchup, cccz, defsec, delfin454000, gs8nrv, gzeon, horsefacts, hubble, hyh, ilan, jah, joestakey, kebabsec, kenta, kenzo, m9800, mics, oyc_109, pauliax, reassor, robee, samruna, sikorico, simon135, throttle, unforgiven, z3s
111.2113 MIM - $111.21
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPair.sol#L545
Recommended code: uint8 constant ACTION_REPAY = 2;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPair.sol#L546
Recommended code: uint8 constant ACTION_REMOVE_COLLATERAL = 4;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPair.sol#L548
Recommended code: uint8 constant ACTION_REQUEST_LOAN = 12;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPair.sol#L549
Recommended code: uint8 constant ACTION_LEND = 13;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPair.sol#L552
Recommended code: uint8 constant ACTION_BENTO_DEPOSIT = 20;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPair.sol#L553
Recommended code: uint8 constant ACTION_BENTO_WITHDRAW = 21;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPair.sol#L554
Recommended code: uint8 constant ACTION_BENTO_TRANSFER = 22;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPair.sol#L555
Recommended code: uint8 constant ACTION_BENTO_TRANSFER_MULTIPLE = 23;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPair.sol#L556
Recommended code: uint8 constant ACTION_BENTO_SETAPPROVAL = 24;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPair.sol#L559
Recommended code: uint8 constant ACTION_CALL = 30;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPair.sol#L562
Recommended code: uint8 constant ACTION_REQUEST_AND_BORROW = 40;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPair.sol#L563
Recommended code: uint8 constant ACTION_TAKE_COLLATERAL_AND_LEND = 41;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPair.sol#L565
Recommended code: int256 constant USE_VALUE1 = -1;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPair.sol#L566
Recommended code: int256 constant USE_VALUE2 = -2;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPairWithOracle.sol#L578
Recommended code: uint8 constant ACTION_REPAY = 2;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPairWithOracle.sol#L579
Recommended code: uint8 constant ACTION_REMOVE_COLLATERAL = 4;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPairWithOracle.sol#L581
Recommended code: uint8 constant ACTION_REQUEST_LOAN = 12;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPairWithOracle.sol#L582
Recommended code: uint8 constant ACTION_LEND = 13;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPairWithOracle.sol#L585
Recommended code: uint8 constant ACTION_BENTO_DEPOSIT = 20;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPairWithOracle.sol#L586
Recommended code: uint8 constant ACTION_BENTO_WITHDRAW = 21;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPairWithOracle.sol#L587
Recommended code: uint8 constant ACTION_BENTO_TRANSFER = 22;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPairWithOracle.sol#L588
Recommended code: uint8 constant ACTION_BENTO_TRANSFER_MULTIPLE = 23;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPairWithOracle.sol#L589
Recommended code: uint8 constant ACTION_BENTO_SETAPPROVAL = 24;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPairWithOracle.sol#L592
Recommended code: uint8 constant ACTION_CALL = 30;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPairWithOracle.sol#L595
Recommended code: uint8 constant ACTION_REQUEST_AND_BORROW = 40;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPairWithOracle.sol#L596
Recommended code: uint8 constant ACTION_TAKE_COLLATERAL_AND_LEND = 41;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPairWithOracle.sol#L598
Recommended code: int256 constant USE_VALUE1 = -1;
By default state variables/constants are internal. Internal keyword can be omitted. Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPairWithOracle.sol#L599
Recommended code: int256 constant USE_VALUE2 = -2;
uint8 is assigned to zero by default, additional reassignment to zero is unnecessary Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPair.sol#L96
https://docs.soliditylang.org/en/v0.8.13/control-structures.html#default-value
Recommended code: uint8 private constant LOAN_INITIAL;
uint256 is assigned to zero by default, additional reassignment to zero is unnecessary Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPair.sol#L641
https://docs.soliditylang.org/en/v0.8.13/control-structures.html#default-value
Recommended code: uint256 i;
uint8 is assigned to zero by default, additional reassignment to zero is unnecessary Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPairWithOracle.sol#L113
https://docs.soliditylang.org/en/v0.8.13/control-structures.html#default-value
Recommended code: uint8 private constant LOAN_INITIAL;
uint256 is assigned to zero by default, additional reassignment to zero is unnecessary Affected code: https://github.com/code-423n4/2022-04-abranft/tree/main/contracts/NFTPairWithOracle.sol#L674
https://docs.soliditylang.org/en/v0.8.13/control-structures.html#default-value
Recommended code: uint256 i;
#0 - cryptolyndon
2022-05-12T04:09:35Z
Matter of choice. I prefer to explicitly initialize variables for readability, even if they get the default. As it happens I'm less attached to the "internal" but at the end of the day that is also subjective and I can see a case for it.
If there is something else in there, I missed it because of the tedious delivery method chosen, and am disputing it on general principle.