Submitted by nuthan2x, also found by SpicyMeatball, 0x0bserver, AM, agadzhalov, Limbooo, offside0011, DanielArmstrong, aslanbek, jesjupyter, kartik_giri_47538, turvy_fuzz, Krace, CaeraDenoir, JrNet, zhaojohnson, KmanOfficial, pkqs90, imare, max10afternoon, SovaSlava, TheSavageTeddy, d3e4, Meera, atoko, juancito (1, 2), Kirkeelee, ziyou-, csanuragjain, kutugu, and xchen1130
https://github.com/code-423n4/2024-02-althea-liquid-infrastructure/blob/bd6ee47162368e1999a0a5b8b17b701347cf9a7d/liquid-infrastructure/contracts/LiquidInfrastructureERC20.sol#L222
Double claim, DOS by bricking distribution, few holders can lose some rewards due to missing validation of distribution timing when owner is calling LiquidInfrastructureERC20::setDistributableERC20s.
This issue will be impacted the following ways:
When a new token is accepted by any NFT it should be added as a desirable token, or a new managerNFT with a new token, then, LiquidInfrastructureERC20::setDistributableERC20shas to be called to distribute the rewards.
So when the owner calls LiquidInfrastructureERC20::setDistributableERC20s which adds a new token as desired token:
All the issues can be countered if the LiquidInfrastructureERC20::setDistributableERC20s is validated to make changes happen only after any potential distributions
The logs of the POC shows the revert Index out of bounds:
First, run forge init --force, then run forge i openzeppelin/openzeppelin-contracts@v4.3.1 and modify foundry.toml file into below:
Then, copy the below POC into test/Test.t.sol and run forge t --mt test_POC -vvvv:
Foundry testing
Modify LiquidInfrastructureERC20::setDistributableERC20s to only change the desirable tokens after a potential distribution for fair reward sharing.
DoS
ChristianBorst (Althea) confirmed via duplicate issue #260
0xA5DF (judge) decreased severity to Medium and commented:
MrPotatoMagic (warden) commented:
0xA5DF (judge) commented:
