Platform: Code4rena
Start Date: 01/08/2023
Pot Size: $91,500 USDC
Total HM: 14
Participants: 80
Period: 6 days
Judge: gzeon
Total Solo HM: 6
Id: 269
League: ETH
Rank: 66/80
Findings: 1
Award: $15.35
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: Team_FliBit
Also found by: 0x70C9, 3docSec, 8olidity, DavidGiladi, Krace, LokiThe5th, Rolezn, Sathish9098, UniversalCrypto, banpaleo5, catellatech, digitizeworx, fatherOfBlocks, hpsb, j4ld1na, josephdara, kutugu, niser93, nonseodion, oakcobalt, osmanozdemir1, pep7siup, ravikiranweb3, said, sivanesh_808
15.3494 USDC - $15.35
Github -> https://github.com/code-423n4/2023-08-goodentry/blob/main/contracts/GeVault.sol#L171
The issue here is that this function allows the owner to add a TR on an arbitrary place in the ticks
list. This breaks the assumption that the ticks
list is always ordered.
Github -> https://github.com/code-423n4/2023-08-goodentry/blob/main/contracts/GeVault.sol#L386
If amount > 0
and allowance < amount
, the function safeIncreaseAllowance
will revert, because we are passing an increase of type(uint).max
(will overflow). The usage of safeIncreaseAllowance
with uint256 max is discouraged, and safeApprove
should be used (approval race condition is irrelevant if we want max allowance). Though this function reverting seems pretty critical, it seems that in the current state of the code we will not have any case where allowance
is neither 0 nor max. Still, we encourage this change.
Github -> https://github.com/code-423n4/2023-08-goodentry/blob/main/contracts/RoeRouter.sol#L76
The owner can call addPool
to add an already existing pool. This leads to a state where a single pool address will have more than one poolId. What's more, one of those poolIds might be deprecated and the other not.
Github -> https://github.com/code-423n4/2023-08-goodentry/blob/main/contracts/RoeRouter.sol#L50
Function deprecatePool
always emits a DeprecatePool
event, regardless of whether or not the pool in questioning had already been deprecated before.
#0 - 141345
2023-08-10T10:15:27Z
#1 - c4-judge
2023-08-20T16:38:08Z
gzeon-c4 marked the issue as grade-b