Skip to content

fix: resolve #520 #521 #522 #523 — escrow path, outbound bonds, fill history, security doc - #631

Open
Ogoh55 wants to merge 1 commit into
stellar-vortex-protocol:mainfrom
Ogoh55:fix/520-521-522-523-batch
Open

Ogoh55 wants to merge 1 commit into
stellar-vortex-protocol:mainfrom
Ogoh55:fix/520-521-522-523-batch

Conversation

@Ogoh55

@Ogoh55 Ogoh55 commented Oct 25, 2026 •

Copy link
Copy Markdown

Summary

Batch fix for four high-severity issues found in the same audit pass.


closes #520 — Remove stale begin_fill placeholder and duplicate fill_intent_inner

Root cause: Two begin_fill definitions existed in the same #[contractimpl] block — a placeholder labeled "For now, this is a placeholder establishing the interface" (no token transfer, weaker auth) and the complete implementation below it. There was also a bodyless fn fill_intent_inner stub with a require_proof parameter shadowing the real definition.

Fix: Remove the placeholder begin_fill entirely (the full escrow implementation with pull_exact and scoped auth already existed). Merge the duplicate fill_intent_inner stub into the single canonical definition.


closes #521 — Per-solver bond tracking in accept_outbound_intent

Root cause: "Store solver bond (simplified — real impl would track per-solver)" — bond_amount was validated but discarded. No tokens were transferred from the solver; SolverRecord was never updated.

Fix: Load solver's SolverRecord, credit bond via set_solver_bond_amount (#187), increment active_intents, pull bond via pull_exact (#409) with fee-on-transfer correction. Remove unused cfg load.


closes #522 — Implement IntentFillHistory writes

Root cause: DataKey::IntentFillHistory was defined but never written. test_archival.rs held a FIXME(fill-history-ttl) skip guard.

Fix: fill_intent_inner now appends (solver, fill_amount, now) with FIFO eviction at MAX_FILL_HISTORY=10 and extend_ttl after every write. Test hardened to assert unconditionally.


closes #523 — Broaden SECURITY.md threat model

Root cause: Threat model was scoped to intent_settlement only. solver_registry, backstop_vault, arbiter_panel custody real value with no published threat model.

Fix: Added dedicated sections for solver_registry, proof_registry, reputation_badge, backstop_vault, and arbiter_panel covering assets at risk, trust assumptions, and known limitations including the Axelar production gap, PRNG panel predictability, and obligation-lock griefing.


Files changed

File Change
intent_settlement/src/lib.rs Remove placeholder begin_fill; remove duplicate fill_intent_inner stub; outbound per-solver bond pull; IntentFillHistory writes
intent_settlement/src/test_archival.rs Harden fill-history TTL test — remove FIXME skip
SECURITY.md Threat-model sections for 5 additional contracts

Closes #520, #521, #522, #523

…ol#521 stellar-vortex-protocol#522 stellar-vortex-protocol#523

stellar-vortex-protocol#520 — Remove stale placeholder begin_fill and duplicate fill_intent_inner
  The placeholder begin_fill (no token escrow, labeled 'For now, this is a
  placeholder') has been removed; the complete implementation with pull_exact
  escrow already existed below it. The duplicate fill_intent_inner stub (with
  a require_proof param but no body) has been merged into the single canonical
  definition.

stellar-vortex-protocol#521 — Implement per-solver bond tracking in accept_outbound_intent
  Replaced the 'Store solver bond (simplified — real impl would track
  per-solver)' comment block with real per-solver tracking: loads the solver's
  SolverRecord (requires solver to be registered), credits the posted bond via
  set_solver_bond_amount (keeping bond_amount, bond_tokens, and
  DataKey::SolverBond in sync per stellar-vortex-protocol#187), increments active_intents, and pulls
  the bond from the solver into the contract via pull_exact (stellar-vortex-protocol#409) for
  fee-on-transfer safety. Removes the unused cfg load.

stellar-vortex-protocol#522 — Implement IntentFillHistory writes in fill_intent_inner
  fill_intent_inner now appends (solver, fill_amount, now) to
  DataKey::IntentFillHistory on every fill, with FIFO eviction once
  MAX_FILL_HISTORY (10) entries is reached and extend_ttl after every
  append. Resolves the FIXME(fill-history-ttl) in test_archival.rs:
  intent_fill_history_ttl_bumped_if_key_exists now asserts the key exists
  and its TTL meets PERSISTENT_TTL_EXTEND_TO rather than skipping
  conditionally.

stellar-vortex-protocol#523 — Broaden SECURITY.md threat model beyond intent_settlement
  Added dedicated threat-model sections for solver_registry (bond custody,
  writer blast radius, obligation-lock griefing), proof_registry (Axelar
  path production gap, Guardian quorum, emitter allowlist, freshness window),
  reputation_badge (dual authority, TTL silent expiry), backstop_vault
  (settlement immutability, emergency mode, insolvency path, inflation
  attack mitigation), and arbiter_panel (PRNG predictability, abstention
  griefing, immutable post-deploy params).
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