Skip to content

Instantly share code, notes, and snippets.

View dcccrypto's full-sized avatar
💭
ITS TIME FOR THE PERCOLATOR

Dark Cobra dcccrypto

💭
ITS TIME FOR THE PERCOLATOR
  • UK
  • 06:23 (UTC -12:00)
View GitHub Profile
@dcccrypto
dcccrypto / poc_bounty5_unattributed_clear.rs
Created May 26, 2026 03:28
PoC: v16 clear_resolved_unattributed_negative_pnl erases bankrupt pnl without consuming insurance or booking social loss
//! Proof-of-concept: `clear_resolved_unattributed_negative_pnl` (engine
//! `v16.rs:9729-9740`) erases a bankrupt account's negative pnl without
//! consuming insurance OR booking social loss OR burning junior face.
//!
//! Reachable when an account has `pnl < 0` AND no active non-stale legs AND
//! no active close-progress ledger AND market mode == Resolved.
//!
//! Trace: `close_resolved_account_not_atomic` (engine `v16.rs:10623`) ->
//! `settle_resolved_bankruptcy_negative_pnl` (engine `v16.rs:9742`) ->
//! `resolved_bankruptcy_attribution` (engine `v16.rs:9701-9727`) returns
@dcccrypto
dcccrypto / poc_bounty5_sticky_hlock.rs
Created May 26, 2026 02:30
PoC: v16 bankruptcy_hlock_active is a sticky kill-switch with no clearer
//! Proof-of-concept tests for `bankruptcy_hlock_active` and
//! `threshold_stress_active` kill-switch asymmetries at the deployed pin
//! (wrapper aeyakovenko/percolator-prog @ af8cf46, engine 23de295).
//!
//! Test 1: `bankruptcy_hlock_active` has 14 set-true writers and zero
//! clearers. Once tripped, it is permanent for the lifetime of the market
//! header. Five readers (engine `h_lock_lane`, four wrapper handler gates)
//! treat the field's true state as an `EngineLockActive`-style reject.
//! Tripping is permissionless — any account whose `pnl < 0` and
//! `capital == 0` flowing through `settle_negative_pnl_from_principal`
@dcccrypto
dcccrypto / poc_bounty5_close_resolved.rs
Last active May 26, 2026 01:21
PoC: v16 Resolved-mode close-or-forfeit deadlocks on bankrupt accounts with pre-existing close-progress ledger
//! Proof-of-concept tests for two v16 close-resolved bugs at the deployed pin
//! (wrapper aeyakovenko/percolator-prog @ af8cf46, engine 23de295).
//!
//! Test 1: bankrupt account with a pre-existing close-progress ledger
//! deadlocks `close_resolved_account_not_atomic` because four outer helper
//! sites propagate `Err(LockActive)` from `declare_permissionless_recovery`
//! in Resolved mode (sibling of `eb48336`).
//!
//! Test 2: `close_resolved_account_not_atomic` charges maintenance fee that
//! grows `header.insurance` but never gets re-credited to per-domain