INTERCEPT PROTOCOL SPECIFICATION · BUILT ON NEAR

Non-Custodial Cross-Chain Liquidation Defense on NEAR

Intercept is non-custodial cross-chain risk infrastructure built natively on NEAR AI Cloud (TEE), NEAR Smart Contracts (near-sdk-rs), NEAR Chain Signatures (v1.signer), and NEAR Intents 1-Click. It protects Solana Kamino Lend borrowers from 5%–10% liquidation penalties using standby USDC held on Base—without ever taking custody of the borrower’s Solana private key or permitting an off-chain agent to sign unverified transaction bytes.

SURVIVAL RATE

100%

Across -34% violent flash crashes vs. 66.7% for static 1.20x bots.
CAPITAL SAVED

73.9%

Less Base USDC deployed during calm mean-reverting pullbacks.
RED-TEAM SUITE

11 / 11

Prompt-injection & gas-griefing exploits blocked in <1.5 ms.
02

How Real Users Onboard & Use Intercept

Unlike traditional DeFi bots that require exporting private keys or approving unlimited token allowances, Intercept onboarding takes three non-custodial steps via the Configure Protection Policy modal on the dashboard:

Step 1 — Connect or Paste Solana Position (Read-Only)No Solana Signature Needed

Click Configure Protection Policy on the dashboard and either click Connect Phantom / Solflare (read-only public key detection) or paste your Kamino Obligation Base58 address. Because Kamino Lend natively allows third-party debt repayment (repay_obligation_liquidity_v2), your Solana wallet never signs a delegation or shares a private key.

Step 2 — Lock Policy Bounds on NEAR (update_policy)intercept-guardrail-373299.testnet

Choose your Trigger Health Factor (e.g. 1.15x / 11500 bps), Max Per-Rescue USDC, Max Daily Limit USDC, and Max Bridge Slippage. Click Save Protection Policy to immediately evaluate your rules against live telemetry and the deployed NEAR Testnet WASM contract, or run the near-cli-rs command below to commit them on-chain.

Step 3 — Fund Your Derived Base MPC VaultBase Chain ID 8453

Transfer idle USDC on Base to your deterministic v1.signer-prod.testnet Base MPC Vault (0xfa1d66b9f3ae95f9d21b8db2315720c2fcde5320). Even $2.00–$3.50 USDC is sufficient to test a complete live cross-chain rescue.

03

End-to-End Security & Telemetry Verification

Borrowers, risk teams, and security auditors can independently verify all four layers of Intercept (Live Mainnet Telemetry, NEAR AI Cloud TEE Reasoning, Deterministic Rust Byte Guardrails, and Quantitative Backtests) either in the browser or via the CLI verification suite:

Verification ActionWhere to TestWhat to Observe
1. Live vs. Flash-Crash SimulationDashboard → Market Stress SimulatorToggle between Live Market (0% Shock), the Micro Buffer Dip (1.20x), and -25% Crash (1.45x) across the trajectory chart and 5-stage pipeline.
2. Prompt-Injection Red-Team (11/11)Dashboard → Security Tests (11/11)Click any of the 11 attack vectors (e.g. rogue ERC-20 destination, Kamino borrow injection, 500 gwei gas drain) to inspect the exact Rust contract panic.
3. Raw EIP-1559 & Solana V0 BytesDashboard → Transaction PayloadsInspect the decoded RLP fields for domain_id: 0 and 539-byte Solana V0 instructions for domain_id: 1.
4. Full CLI & Rust Test SuiteTerminal (npm run verify)Runs live v1.signer MPC derivation, 29 Rust unit & adversarial tests, 11 Red-Team proofs, and 3-regime backtests.
04

3-Domain Non-Custodial Isolation Model

The foundational security invariant of Intercept is that the AI agent never holds keys and never has a code path to user collateral:

3-Domain Cryptographic Separation
[Domain A: User Solana EOA]
  ├── Owns Kamino Obligation (SOL Collateral + USDC Debt)
  └── Private key NEVER shared with NEAR, MPC, or AI Agent

[Domain B: NEAR AI Cloud TEE + intercept-guardrail-373299.testnet]
  ├── TEE Enclave signs Ed25519 Rescue Receipt (32B CSPRNG nonce + TDX/Hopper quote)
  ├── Scoped NEAR FunctionCall Access Key (1.00 NEAR gas allowance, 0 NEAR attached deposit)
  │     ├── v3 Key Spec: request_rescue_origin_leg, request_rescue_destination_leg, cancel_refunded_rescue
  │     ├── Contract sponsors 0.05 NEAR v1.signer fee internally (reclaimed via refund)
  │     └── Forbidden: update_policy (Owner-only, locked while in flight), TransferNEAR, DeployContract, AddKey
  └── Rust Guardrail parses every byte of Leg 1 & Leg 2 before calling v1.signer

[Domain C: v1.signer-prod.testnet Chain Signatures + NEAR Intents 1-Click]
  ├── domain_id: 0 (Secp256k1) -> MPC_Base_Vault (0xfa1d66b9f3ae95f9d21b8db2315720c2fcde5320)
  └── domain_id: 1 (Ed25519)   -> MPC_Solana_Payer (7AqKFEDJ13ZxpnQnBEEM6XmGq2LNa65jXBE4q96emvCo)
05

Volatility-Aware TEE Risk Engine (NEAR AI Cloud)

Executing inside NEAR AI Cloud (deepseek-ai/DeepSeek-V4.1-Flash-1017 on Intel TDX + NVIDIA Hopper), the risk engine computes expected liquidation penalty versus cross-chain execution cost and selects one of three deterministic regimes:

RegimeTrigger ConditionTarget Post-Rescue HFEconomic Rationale
HOLDObserved HF >= 1.1500No ActionPreserves 100% of idle USDC yield on Base with 0 false triggers.
MICRO_BUFFER_RESCUEHF < 1.1500 · Calm Spread1.2000xDeploys minimal USDC during orderly dips, saving 73.9% capital vs. static 1.45x bots.
CASCADE_DEEP_RESCUEHF < 1.1500 · High Vol / Spread1.4500xBuilds a 31% liquidation buffer to survive violent multi-candle flash crashes (-34%).
06

Deterministic Rust Byte-Level Guardrail Specification

The NEAR smart contract (contracts/policy-guardrail/src/lib.rs) never trusts a pre-computed hash from the AI agent. It requires the full raw unsigned transaction payload and enforces byte-offset invariants:

Leg 1 — Base EIP-1559 RLP Verifier

request_rescue_origin_leg

• Receipt observed_hf_bps < min_trigger_hf_bps
• First byte must be 0x02 & chain_id == 8453
• max_priority_fee_per_gas <= 10 gwei, max_fee <= 50 gwei
• to == 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
• value == 0 (Zero native ETH drain)
• Calldata [0..4] == 0xa9059cbb (68 bytes, blocks approve)
• Calldata [16..36] == 1-Click Deposit Address
• Calldata [52..68] == Receipt Amount <= Per-Action & 24h Cap

Leg 2 — Solana V0 Kamino Verifier

request_rescue_destination_leg

• Raw V0/Legacy message (64..=1232B; live 5-ix V0 = 539B)
• Prefix 0x80, num_required_signatures == 1, ALTs == 0
• ComputeBudget price <= 5,000,000 micro-lamports
• Whitelisted Kamino KLend2g3... refresh + 1 repay ix
• Discriminator 0x74aed54cb435d290 (Repay v2)
• [0] MPC Payer · [1] Obligation · [2] Main Market
• [3] == Pinned Mainnet USDC Reserve (D6q6wu...)
• [5] == Non-Aliasing MPC Solana USDC ATA
• [6] == SPL_TOKEN_PROGRAM (Tokenkeg... · blocks Token-2022 hooks)
07

Multi-Domain v1.signer MPC, Async State & Solver Refund Safety

Because NEAR cross-contract calls to v1.signer execute asynchronously across blocks, Intercept enforces a strict 4-state per-receipt lifecycle (InFlightLeg1 → ReadyForLeg2 → InFlightLeg2 → Completed) with non-panicking #[private] callbacks (on_origin_leg_signed, on_destination_leg_signed) that atomically roll back rolling_24h_spent_usdc if Leg 1 MPC signing fails, or revert to ReadyForLeg2 for safe retry if Leg 2 signing fails. Furthermore, every NEAR Intents 1-Click quote pins refundTo = MPC_Base_Vault: if a solver returns REFUNDED or FAILED after Leg 1, the orchestrator halts before Leg 2 and invokes cancel_refunded_rescue to restore the 24-hour cap while keeping the receipt hash permanently replay-locked.

08

11-Vector Adversarial Red-Team Verification Matrix

#Exploit VectorTarget LayerGuardrail Enforcement
01Unauthorized Kamino Collateral WithdrawalLeg 2 · Solana V0Discriminator != Repay v2/v1 -> Revert
02Base USDC Recipient RedirectionLeg 1 · Base EVMCalldata [16..36] != 1-Click Deposit -> Revert
03ERC-20 Unlimited Approval InjectionLeg 1 · Base EVMSelector != 0xa9059cbb -> Revert
04Unauthorized Kamino Debt DrawdownLeg 2 · Solana V0Borrow Discriminator Blocked -> Revert
05Kamino Obligation Account SubstitutionLeg 2 · Solana V0Account [1] != User Obligation -> Revert
06Forged Enclave Attestation SignatureTEE AttestationEd25519 Verify / Nonce Replay -> Revert
07Solana V0 Address Lookup Table ObfuscationLeg 2 · Solana V0address_table_lookups_len != 0 -> Revert
08Blind 32-Byte Digest Signing AttemptLeg 2 · Solana V0Length < 64 bytes -> Revert
09Asynchronous Cross-Contract State RaceAsync TOCTOU StateState != ReadyForLeg2 -> Revert
10Base EIP-1559 Gas-Fee SiphoningLeg 1 · Base EVMmax_fee_per_gas > 50 gwei -> Revert
11Solana Compute-Budget Fee SiphoningLeg 2 · Solana V0SetComputeUnitPrice > 5M -> Revert
09

CLI Verification & On-Chain Deployment Reference

1. Run Deterministic 5-Step Mainnet Verifier & Backtest Suite
npm run verify
2. Run 29 Rust Guardrail Smart Contract Unit & Red-Team Tests
cargo test --manifest-path contracts/policy-guardrail/Cargo.toml
3. Configure Policy On-Chain (update_policy)
near contract call-function as-transaction intercept-guardrail-373299.testnet update_policy json-args '{"new_policy":{"owner_id":"intercept-guardrail-373299.testnet","authorized_agent_id":"runner.intercept-guardrail-373299.testnet","mpc_signer_contract":"v1.signer-prod.testnet","tee_enclave_pubkey_hex":"7885b100077bd5400dd8d3ea0ae6d3ef863e827adbdb5ba09ff4963c6e6e32c5","mpc_base_vault_address_hex":"0xfa1d66b9f3ae95f9d21b8db2315720c2fcde5320","mpc_solana_payer_pubkey":"7AqKFEDJ13ZxpnQnBEEM6XmGq2LNa65jXBE4q96emvCo","user_kamino_obligation_pubkey":"C5dZVpvpA39SNLDkojsi98nRePRRy8ELhtxak8m2vMq","kamino_lending_market_pubkey":"7u3HeHxYDLhnCoErrtycNokbQYbWGzLs6JSDqGAv5PfF","sol_collateral_reserve_pubkey":"d4A2prbA2whesmvHaL88BH6Ewn5N4bTSU2Ze8P6Bc4Q","usdc_repay_reserve_pubkey":"D6q6wuQSrifJKZYpR1M8R4YawnLDtDsMmWM1NbBmgJ59","base_derivation_path":"intercept-base-vault-1","solana_derivation_path":"intercept-solana-payer-1","max_per_action_usdc":"2500000000","max_daily_usdc":"5000000000","max_slippage_bps":100,"min_trigger_hf_bps":11500,"max_receipt_age_sec":300}}' prepaid-gas '80.0 Tgas' attached-deposit '0 NEAR' sign-as intercept-guardrail-373299.testnet network-config testnet sign-with-keychain send
On-Chain StepContract / MethodTransaction Hash (NearBlocks)
Contract Deploy & Initintercept-guardrail-373299.testnet::newFHbKGEa9q2h3Pu4adQpyVhSHVAfiPZSFQTk9DNCb6ns9
WASM Upgrade & Owner Policy UpdateDeployContract + update_policyAtGgegrK4nGFX7Lksu66zSBvgGoqP8Wr7jAQepfaW3Bf
Scoped FunctionCall Key Provisioningrunner.intercept-guardrail-373299.testnet (AddKey)3TFzFZ6vF1uEYBEPtvf8X5PDiWo3VKZojJSMzuiKriVF
Leg 1 Zero-Deposit FunctionCall Rescue (Secp256k1)request_rescue_origin_leg → v1.signer-prod.testnet5GZMVE9fokSqLqNNxZTLZEzeHrBbkQSAfLro5NMeZFJt
Leg 2 Zero-Deposit FunctionCall Repay (Ed25519)request_rescue_destination_leg → v1.signer-prod.testnet9mHD6Qp7tCeaMieWyLTYb7wE3YyHRR3BmtqcdzG2xeFr
On-Chain Healthy-Position Block (HF >= Trigger)PositionHealthyAboveTrigger Reverti1YgQ5EMZ78FWUoD8kZFKyqpADY6RNo6kKNYTCKrudJ
Async TOCTOU Failure Rollbackon_origin_leg_signed (rescue_origin_leg_rolled_back)GnXXpAsFo6w9c77SjkK8VNYvY3uAwY49rPdFPbnzhvkk
Hardened v3 WASM & Solver-Refund UpgradeDeployContract (FfC8pRQss8...) + update_policyAxUeZPcQUQWNjFfhdB84JMN8JRghu21bs9mykXEAZiwD