Platform: Code4rena
Start Date: 26/09/2022
Pot Size: $50,000 USDC
Total HM: 13
Participants: 113
Period: 5 days
Judge: 0xean
Total Solo HM: 6
Id: 166
League: ETH
Rank: 111/113
Findings: 1
Award: $24.02
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: IllIllI
Also found by: 0x1f8b, 0x5rings, 0xNazgul, 0xRoxas, 0xSmartContract, 0xbepresent, 0xmatt, Aeros, Amithuddar, Awesome, Aymen0909, B2, Bnke0x0, ChristianKuri, CodingNameKiki, Deivitto, Diraco, Fitraldys, HardlyCodeMan, JC, Mukund, Noah3o6, Olivierdem, RaymondFam, ReyAdmirado, RockingMiles, Rolezn, Ruhum, Saintcode_, Shinchan, SnowMan, TomJ, Tomio, Tomo, V_B, Waze, __141345__, ajtra, asutorufos, aysha, beardofginger, bobirichman, brgltd, bulej93, c3phas, ch0bu, cryptonue, defsec, delfin454000, dharma09, durianSausage, emrekocak, erictee, fatherOfBlocks, francoHacker, gianganhnguyen, gogo, imare, kaden, karanctf, ladboy233, lukris02, m_Rassska, martin, medikko, mics, natzuu, oyc_109, peiw, rbserver, ret2basic, rotcivegaf, saian, shark, slowmoses, tnevler, trustindistrust, zeesaw, zishansami
24.0179 USDC - $24.02
/src/core/contracts/AlgebraPool.sol
Line(s): 224, 228, 237 (NOT liquidityDelta), 434, 451, 452, 454 ((amount0 != 0)
), 455 ((amount0 != 0)
), 469, 505, 506, 617, 667, 808, 814, 898, 904, 911, 924, 927, 938, 941
224: require(currentLiquidity > 0, 'NP'); 228: if (_liquidityCooldown > 0) { 237: liquidityNext > 0 ? (liquidityDelta > 0 ? _blockTimestamp() : lastLiquidityAddTimestamp) : 0 434: require(liquidityDesired > 0, 'IL'); 451: if (amount0 > 0) receivedAmount0 = balanceToken0(); 452: if (amount1 > 0) receivedAmount1 = balanceToken1(); 454: if (amount0 > 0) require((receivedAmount0 = balanceToken0() - receivedAmount0) > 0, 'IIAM'); 455: if (amount1 > 0) require((receivedAmount1 = balanceToken1() - receivedAmount1) > 0, 'IIAM'); 469: require(liquidityActual > 0, 'IIL2'); 505: if (amount0 > 0) TransferHelper.safeTransfer(token0, recipient, amount0); 506: if (amount1 > 0) TransferHelper.safeTransfer(token1, recipient, amount1); 617: if (communityFee > 0) { 667: if (communityFee > 0) { 808: if (cache.communityFee > 0) { 814: if (currentLiquidity > 0) cache.totalFeeGrowth += FullMath.mulDiv(step.feeAmount, Constants.Q128, currentLiquidity); 898: require(_liquidity > 0, 'L'); 904: if (amount0 > 0) { 911: if (amount1 > 0) { 924: if (paid0 > 0) { 927: if (_communityFeeToken0 > 0) { 938: if (paid1 > 0) { 941: if (_communityFeeToken1 > 0) {
/src/core/contracts/AlgebraFactory.sol Line(s): 110
110: require(gamma1 != 0 && gamma2 != 0 && volumeGamma != 0, 'Gammas must be > 0');
/src/core/contracts/AlgebraPool.sol Line(s): 739, 743, 953, 968
739: require(limitSqrtPrice < currentPrice && limitSqrtPrice > TickMath.MIN_SQRT_RATIO, 'SPL'); 743: require(limitSqrtPrice > currentPrice && limitSqrtPrice < TickMath.MAX_SQRT_RATIO, 'SPL'); 953: require((communityFee0 <= Constants.MAX_COMMUNITY_FEE) && (communityFee1 <= Constants.MAX_COMMUNITY_FEE)); 968: require(newLiquidityCooldown <= Constants.MAX_LIQUIDITY_COOLDOWN && liquidityCooldown != newLiquidityCooldown);
/src/core/contracts/AlgebraPool.sol Line(s): 925, 939
925: uint8 _communityFeeToken0 = globalState.communityFeeToken0; 939: uint8 _communityFeeToken1 = globalState.communityFeeToken1;
/src/core/contracts/libraries/Constants.sol Line(s): 5, 16
5: uint8 internal constant RESOLUTION = 96; 16: uint8 internal constant MAX_COMMUNITY_FEE = 250;
/src/core/contracts/libraries/TickTable.sol Line(s): 18, 84, 102
18: uint8 bitNumber; 84: uint8 bitNumber; 102: uint8 bitNumber;
/src/core/contracts/base/PoolState.sol Line(s): 13, 14
13: uint8 communityFeeToken0; 14: uint8 communityFeeToken1;
src/core/contracts/AlgebraPoolDeployer.sol Line(s): 13
19: address private owner;
src/core/contracts/DataStorageOperator.sol Line(s): 15, 16
15: uint256 constant UINT16_MODULO = 65536; 16: uint128 constant MAX_VOLUME_PER_LIQUIDITY = 100000 << 64;