Skip to content

support drain liquidity when dev rugged 60days project#140

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

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

Conversation

@koo-virtuals
Copy link
Contributor

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

Note

High Risk
Introduces executor-only functions that can withdraw all liquidity (including setting UniV2 amountAMin/amountBMin to 0), making role assignment/configuration of bondingV2 and REMOVE_LIQUIDITY_ROLE security-critical.

Overview
Adds privileged liquidity drain capabilities for rugged Project60days tokens.

FRouterV2 gains setBondingV2 plus two new EXECUTOR_ROLE-gated operations: drainPrivatePool (empties an FPairV2’s asset+token balances to a recipient and emits PrivatePoolDrained) and drainUniV2Pool (verifies veToken/LP pair matches agentToken+$Virtual, then drains the founder’s full veToken balance via AgentFactoryV6.removeLpLiquidity, emitting UniV2PoolDrained).

To keep state coherent after private-pool drains, FPairV2/IFPairV2 add syncAfterDrain and a Sync event to adjust internal reserves/k without relying on balanceOf, with router-side try/catch for backward compatibility. Interfaces are extended (IAgentFactoryV6.removeLpLiquidity, IAgentVeTokenV2.founder) and a comprehensive test/project60days/drainLiquidity.js suite is added covering success and revert paths.

Written by Cursor Bugbot for commit 638e098. 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 1 potential issue.

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