Platform: Code4rena
Start Date: 03/05/2023
Pot Size: $60,500 USDC
Total HM: 25
Participants: 114
Period: 8 days
Judge: Picodes
Total Solo HM: 6
Id: 234
League: ETH
Rank: 81/114
Findings: 1
Award: $36.24
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: rbserver
Also found by: 0xnev, ABAIKUNANBAEV, Audit_Avengers, Aymen0909, BGSecurity, BRONZEDISC, Bason, DadeKuma, GG_Security, Jerry0x, Jorgect, MohammedRizwan, REACH, Sathish9098, Shogoki, T1MOH, UniversalCrypto, aviggiano, ayden, berlin-101, bytes032, codeslide, descharre, fatherOfBlocks, hals, kaveyjoe, kodyvim, lfzkoala, lukris02, nadin, naman1778, patitonar, pontifex, sakshamguruji, squeaky_cactus, teawaterwire, wonjun, yjrwkk
36.2377 USDC - $36.24
It is recommended to use OpenZeppelin's safeTransferFrom.
ajna-core/src/RewardsManager.sol#L250
IERC721(address(positionManager)).transferFrom(msg.sender, address(this), tokenId_);
ajna-core/src/RewardsManager.sol#L302
E.g. 1e18
instead of 10 ** 18
. While the compiler knows to optimize away the exponentiation, it is a better coding practice to use idioms that do not require compiler optimization, if they exist.
ajna-grants/src/grants/libraries/Maths.sol#L6
uint256 public constant WAD = 10**18;
ajna-grants/src/grants/libraries/Maths.sol#L30
ajna-grants/src/grants/libraries/Maths.sol#L34
ajna-grants/src/grants/libraries/Maths.sol#L38
ajna-grants/src/grants/libraries/Maths.sol#L47
Suffixes like seconds
, minutes
, hours
, days
and weeks
after literal numbers can be used to specify units of time.
ajna-grants/src/grants/base/StandardFunding.sol#L34
uint256 internal constant CHALLENGE_PERIOD_LENGTH = 50400;
ajna-grants/src/grants/base/StandardFunding.sol#L40
ajna-grants/src/grants/base/StandardFunding.sol#L46
ajna-grants/src/grants/base/Funding.sol#L31
Keep line width to max 120 characters for better readability where possible.
ajna-core/src/PositionManager.sol#L423
address erc20DeployedPoolAddress = erc20PoolFactory.deployedPools(subsetHash_, collateralAddress, quoteAddress);
There are 70 occurances of this issue.
ajna-core/src/PositionManager.sol#L3
pragma solidity 0.8.14;
There are 11 occurances of this issue.
ajna-core/src/PositionManager.sol#L3
pragma solidity 0.8.14;
ajna-grants/src/grants/GrantFund.sol#L3
pragma solidity 0.8.16;
#0 - c4-judge
2023-05-18T18:30:04Z
Picodes marked the issue as grade-b