Skip to main content

Threat table

Verified against: F-013 (2026-11-09), F-015 (2026-11-09), F-031 (2026-11-09), F-052 (2026-11-09), F-080 (2026-11-09) · spec docs/PRD.md §15 · D-003, D-005, D-010

Status: controls are specified. The "Test" column names the planned test. Each becomes a real test name from contracts/nectar-core/tests after G1, or from the Anchor suite after G7. Nothing here is claimed as passing yet.

ThreatControlTest (planned)
Fake collateral or fake USDC creditedft_on_transfer checks the predecessor against configured tokens; unknown tokens panicunit: wrong predecessor panics
Oracle manipulation (Rhea-style, F-052)named feed only, no DEX valuation, freshness, 1,500 bps band, two-step overrideunit: band rejects; sandbox: stale price blocks borrow
Keeper makes the contract sign an arbitrary payloadkeeper passes only position_id; preimage built from state (D-003, F-031)unit: no method accepts a hash
Keeper key leakfunction-call key for two methods, no deposits (F-015, D-010); set_keeper rotationsandbox: ft_transfer with the keeper key fails
Quoter returns an absurd discountclamp to [0, max_discount_bps]; price band; quoter_fallbackunit: 9,999 bps clamps
Quoter downtimeout leads to P0 pricing; eventsandbox: callback failure path
Escrow double useremaining_usd_e6 decremented before any promise; Settling lockunit: two triggers on one position
Withdrawal raceQ_c decremented at initiate; notice period; settlement may consume during noticeunit: settle during notice
Fee accumulator driftO(1) maths against a loop model; fee_debt set at fund and top-upproperty test, 1,000 random ops
Storage griefing64 quotes per asset, $100 minimum, position capunit
Signature replay on Solananonce in program state, expires, program id in preimage, path per chainAnchor test: second settle fails
Relay refusalany keeper can relay a signed message; stuck position visibleintegration
Wrong token amount semanticsft_transfer_call with exactly 1 yoctoNEAR; refunds via return value (F-013)sandbox: invalid msg refunds in full
Web supply chainpinned versions, lockfile, pnpm audit in CI, no third-party script before consentCI
Secrets in the repokeys created by CLI into the OS keychain; .env holds paths only; gitleaks pre-commitG9: gitleaks detect --log-opts=--all