Skip to content

feat(guard): NAV circuit breaker with auto-pause#8

Merged
jayeshy14 merged 1 commit into
mainfrom
feat/circuit-breaker
May 29, 2026
Merged

feat(guard): NAV circuit breaker with auto-pause#8
jayeshy14 merged 1 commit into
mainfrom
feat/circuit-breaker

Conversation

@jayeshy14
Copy link
Copy Markdown
Owner

Adds a NAV circuit breaker that bounds how far the share price can move between checkpoints.

  • Hot-path tripwire on every deposit/withdraw: reverts (SharePriceDeviation) if the live share price deviates beyond maxSharePriceDeltaBps, so users never transact at an anomalous NAV. Self-healing.
  • Latching auto-pause via permissionless guardCheckpoint(): a keeper/agent poke that commits paused = true on a breach (a revert can't latch a pause in the same call), persisting until the owner reviews.
  • Owner controls: setMaxSharePriceDelta, pause/unpause (rebaselines). Default bound 0 = disabled.
  • Share-price math centralised in LibGuard (single source of the virtual-share offset).

104/104 unit tests pass (15 new); no storage collisions.

@jayeshy14 jayeshy14 merged commit 7651db2 into main May 29, 2026
1 of 3 checks passed
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.

1 participant