Skip to content

support drain liquidity when dev rugged 60days project#140

Open
koo-virtuals wants to merge 6 commits intomainfrom
feat/vp-1981
Open

support drain liquidity when dev rugged 60days project#140
koo-virtuals wants to merge 6 commits intomainfrom
feat/vp-1981

Conversation

@koo-virtuals
Copy link
Contributor

@koo-virtuals koo-virtuals commented Feb 5, 2026

Note

High Risk
Introduces new admin/executor-only functions that can drain all pool liquidity and bypass normal withdrawal/maturity constraints, so any role misconfiguration or logic bug could lead to asset loss or abuse.

Overview
Adds privileged liquidity drain paths for rugged Project60days tokens.

FRouterV2 now supports setBondingV2() plus drainPrivatePool() to withdraw all funds from the bonding-curve FPairV2 pool and drainUniV2Pool() to remove all Uniswap V2 liquidity by burning the founder’s veToken balance via AgentFactoryV6.removeLpLiquidity(), with new drain events and token/LP validation gates.

Hardens swap safety by reverting BondingV2/BondingV3/BondingV4 buys/sells when the router returns zero output (preventing post-drain zero-out swaps/forced graduation), and updates FPairV2/IFPairV2 with syncAfterDrain() + Sync event to keep reserves/k consistent after draining; extensive new tests cover drain flows, role gating, and regression scenarios.

Written by Cursor Bugbot for commit 419d569. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants