[REAL LoF / DoS] Credit post-snapshot expired backing to payouts - #147
Draft
aeyakovenko wants to merge 2 commits into
Draft
Conversation
Owner
Author
|
Proof-strengthening follow-up pushed in Added/generalized obligations:
Non-vacuity/mutation checks:
Verification:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Root cause
Fresh source backing is excluded from junior residual while it remains a senior provider claim. If that backing expired after the resolved payout snapshot was captured, it became junior residual but the frozen payout ledger was not increased. Close order could therefore leave real vault atoms outside every claimant's entitlement.
The public LiteSVM reproduction on the exact parent creates two independent winner/loser pairs and captures a 40/80 payout snapshot before the second 40-atom counterparty backing bucket expires. Both losers receive 960 and both winners receive only 1,020 from four 1,000-atom deposits, while 40 atoms remain in the vault as the winners' unpaid claims.
Impact
Each independent winner loses 20 atoms and the terminal market retains 40 undistributable atoms after all positions are closed. This is both loss of funds and terminal market denial of service through ordinary public trade, crank, resolve, and close routes.
Verification
cargo test --all-targets(50 unit, 10 backing fuzz, 2 insolvent payout fuzz, 75 v16 spec tests)cargo kani --tests --features fuzz --exact --harness proof_v16_post_snapshot_backing_expiry_credits_junior_pool(99 checks, 2/2 covers)