Skip to content

fix: guard risk-pool withdrawals when capital is drained - #710

Merged
nonsobethel0-dev merged 1 commit into
Parashield-Protocol:mainfrom
iamcracked-dev:fix/guard-drained-risk-pool-668
Oct 19, 2026
Merged

nonsobethel0-dev merged 1 commit into
Parashield-Protocol:mainfrom
iamcracked-dev:fix/guard-drained-risk-pool-668

Conversation

@iamcracked-dev

@iamcracked-dev iamcracked-dev commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Closes #668
Closes #648
Closes #649
Closes #650

Summary

This pull request makes the fully utilized and drained risk-pool state explicit during LP redemption. When all deposited capital is locked, there is no valid share price or withdrawable liquidity to calculate, so the contract now returns a dedicated typed error instead of treating the condition as a generic collateral failure.

Issue #668: Guard drained-pool withdrawals

  • Added the PoolDrained contract error for the no-unlocked-liquidity state.
  • Applied the guard to the normal withdrawal path.
  • Applied the same guard to the admin-approved emergency withdrawal path.
  • Preserved the existing arithmetic and balance checks for partially utilized pools.
  • Prevented withdrawal math from proceeding when total locked capital consumes the entire deposited balance.

Assigned issue references

The description includes both assigned Parashield Contracts issues: #668 and #648. The implementation is focused on the drained-pool behavior described by #668; the existing source already contains the disputed-claim status guard associated with #648.

Verification

Not run, per request. No installation, build, test, or CI check was performed.

@drips-wave

drips-wave Bot commented Oct 19, 2026

Copy link
Copy Markdown

@iamcracked-dev Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@nonsobethel0-dev
nonsobethel0-dev merged commit 0dd8d8e into Parashield-Protocol:main Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants