The Standard

The Standard
DeFiHardhat
20,000 USDC
View results
Submission Details
Severity: low
Invalid

LiquidationPool Dust Locked

Summary

There is currently no way to withdraw the remaining dust from the tokens. Depending on the quantities used and the number of users interacting with the contract, over time, dust will accumulate that cannot be withdrawn.

Vulnerability Details

Small loss of funds that may escalate over time and with the number of users utilizing the contract.

Impact

Accumulation of dust that remain unused.

POC

describe("LiquidationPool Dust", () => {
it("Test", async () => {
const holders = [];
let stakeValue = ethers.utils.parseEther('10');
let initialEUROsManagerBalance = 45612378345315;
for (let i = 0; i < 5; i++) {
wallet = ethers.Wallet.createRandom();
wallet = wallet.connect(ethers.provider);
await network.provider.send("hardhat_setBalance", [
wallet.address,
"0x1000000000000000",
]);
await TST.mint(wallet.address, stakeValue);
await EUROs.mint(wallet.address, stakeValue);
await TST.connect(wallet).approve(LiquidationPool.address, stakeValue);
await EUROs.connect(wallet).approve(LiquidationPool.address, stakeValue);
await LiquidationPool.connect(wallet).increasePosition(stakeValue, stakeValue);
holders.push(wallet);
}
await fastForward(DAY + 1);
await EUROs.mint(LiquidationPoolManager.address, initialEUROsManagerBalance);
await LiquidationPoolManager.distributeFees();
for (let i = 0; i < holders.length; i++) {
const position = await LiquidationPool.position(holders[i].address);
await LiquidationPool.connect(holders[i]).decreasePosition(position[0].TST, position[0].EUROs);
}
const finalPoolBalanceEUROs = await EUROs.balanceOf(LiquidationPool.address);
const finalPoolBalanceTST = await TST.balanceOf(LiquidationPool.address);
console.log({ finalPoolBalanceTST, finalPoolBalanceEUROs });
})
})

Tools Used

Hardhat

Recommendations

Find a way to distribute it to the users or create a function to withdraw the dust.

Updates

Lead Judging Commences

hrishibhat Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

informational/invalid

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.