Closed c4-bot-8 closed 3 months ago
Hi @alex-ppg , This is a duplicate of this issue
Hey @DevHals, thank you for the PJQA contribution. I will preface all validation repository finding responses by stating that they are not evaluated by judges directly and are only evaluated by the validators if they are deemed unsatisfactory.
This submission is indeed a duplicate and will be migrated soon. This issue's discussion thread will be updated with the relevant issue number in the findings repository when that is done.
This paragraph is included in all of my responses and confirms that no further feedback is expected in this submission as PJQA has concluded. You are free to refute any of my statements factually, however, I strongly implore you to do this with actual code references and examples.
The finding has been migrated here as issue #221.
Lines of code
https://github.com/code-423n4/2024-06-vultisig/blob/cb72b1e9053c02a58d874ff376359a83dc3f0742/hardhat-vultisig/contracts/extensions/VultisigWhitelisted.sol#L30 https://github.com/code-423n4/2024-06-vultisig/blob/cb72b1e9053c02a58d874ff376359a83dc3f0742/hardhat-vultisig/contracts/Whitelist.sol#L204-L228
Vulnerability details
Impact
ILOPool
is initialized with the$VULT
token being the sale token, users can buy shares of the liquidity before the project launch (viaILOPool.buy()
) then claim theirVULT
token viaILOPool.claim()
where the claimed sale token will be burnt from the pool liquidity and sent to the user.The
VaultSigWhitelisted
token contract has a_beforeTokenTransfer()
hook that checks the following before transferring tokens to the recipient:to
) is whitelisted._maxAddressCap
, where this is set to3 ether
for each account:where:
but this
_contributed[to] + estimatedETHAmount < _maxAddressCap
check can be bypassed, let's see the following scenario:ILOPool.buy()
(the max limit to buy for each investor issaleInfo.maxCapPerUser
).$VULT
) via multipleILOPool.claim()
txns over time (as the vesting period ends for each schedule), and when the liquidity is burned from the uniswapv3 pool and transferred to the investor;_beforeTokenTransfer()
hook will be invoked by the$VULT
whitelisted token contract to check if the investor is whitelisted and if the amount of his claimed tokens doesn't exceed the_maxAddressCap
.$VULT
is valued at a high price; then theestimatedETHAmount
of the$VULT
will be high resulting in the total contributions of the investor being > 3 ethers, so hisILOPool.claim()
txn will revert withMaxAddressCapOverflow
revert message.Proof of Concept
VultisigWhitelisted._beforeTokenTransfer()
Whitelist.checkWhitelist()
Tools Used
Manual Review.
Recommended Mitigation Steps
A mitigation could be preventing transferring position NFT during claiming window, or by introducing a new mechanism to refund investors their raised tokens if their contributions exceeds
_maxAddressCap
.Assessed type
Context