/
Integrations & Proof Table
Cryptographic Proofs

Source: docs/INTEGRATIONS.md

0-RADIUS SPEC

Integrations & Verifiable Testnet Records

This document records the official standards, smart contract interfaces, cryptographic endpoints, and verified testnet transactions for the $SOGOK Protocol. Every claim is anchored directly to deployed code, live RPC responses, or cryptographic signatures.


#1. Official Standards & Sources Consulted

Subsystem / ProtocolStandard / SpecificationDocumentation Reference
NEAR Fungible TokenNEP-141 (Fungible Token Core)https://nomicon.io/Standards/Tokens/FungibleToken/Core
NEAR Events StandardNEP-297 (Events Standard)https://nomicon.io/Standards/Tokens/FungibleToken/Event
Intel SGX Remote AttestationIntel DCAP Architecture (ECDSA/Ed25519)https://www.intel.com/content/www/us/en/developer/tools/software-guard-extensions/attestation-services.html
NEAR AI Cloud EnclaveConfidential Cloud Computing APIhttps://docs.near.ai/cloud
Defuse 1Click Solver RelayCross-Chain Intent Solvershttps://docs.defuse.org (Solver Relay v2)
Ed25519 CryptographyRFC 8032 EdDSA Signature Schemehttps://datatracker.ietf.org/doc/html/rfc8032

#2. NEAR Testnet Smart Contract (sogok-protocol.testnet)

The core tokenomics, sentinel registry, and bounty settlement engine are deployed on the NEAR Protocol testnet.

  • Contract Account ID: sogok-protocol.testnet
  • Wasm Binary Hash: 9b4f62e8473c9c9b1473950efcf81297e6e5dca5d7620bc695e2eb27ce5c4b37
  • Standard Compliance: NEP-141 (transfer, metadata), NEP-297 (token burn/mint events), Nonce-Replay Protected Claims.

##Key Smart Contract Interfaces

1. Attack Probe Settlement (ft_transfer_call)

rustCANONICAL_SPEC
pub fn ft_on_transfer(
    &mut self,
    sender_id: AccountId,
    amount: U128,
    msg: String
) -> PromiseOrValue<U128>
  • Receives $SOGOK attack fees from white-hat security researchers.
  • Parses msg containing {"sentinel_id": 0, "prompt_hash": "..."}.
  • Executes the tripartite split: - 40% Burn: Transferred to zero-address and subtracted from total supply. Emits NEP-297 ft_burn. - 40% Jackpot: Deposited into the target sentinel's token_bounty pool. - 20% Defender Royalty: Transferred immediately to the sentinel creator.

2. Sentinel Registration (deploy_sentinel)

rustCANONICAL_SPEC
#[payable]
pub fn deploy_sentinel(
    &mut self,
    name: String,
    model_persona: String,
    system_prompt: String,
    canary_secret_hash: String,
    attack_fee: U128,
    lockup_period_ns: U64
) -> u64
  • Requires attached NEAR deposit (minimum 5 NEAR) as locked breach collateral.
  • Stores the SHA-256 hash of the secret canary token.
  • Locks funds until either a breach is proven or lockup expires.

3. Cryptographic Bounty Claim (claim_breach_bounty)

rustCANONICAL_SPEC
pub fn claim_breach_bounty(
    &mut self,
    sentinel_id: u64,
    payload: TEEVerdictPayload,
    signature_hex: String
) -> Promise
  • Computes canonical verification payload via payload.to_canonical_bytes(): SOGOK_TEE_VERDICT:sentinel_id=<id>:prompt_hash=<hash>:verdict=JAILBROKEN:recipient=<recipient>:timestamp=<ts>:nonce=<nonce>:measurement=<quote_hash>
  • Asserts payload.recipient == env::predecessor_account_id().
  • Validates anti-replay nonce: !self.used_nonces.contains_key(&payload.nonce).
  • Validates measurement quote against guardian_config.measurement_quote_hash.
  • Executes GuardianVerifier::verify_attestation via near_sdk::env::ed25519_verify using guardian_config.guardian_public_key.
  • Transfers 100% of the locked NEAR treasury plus accumulated $SOGOK jackpot to the attacker.

#3. TEE Guardian Relayer Architecture

The TEE Guardian operates inside an Intel SGX hardware enclave deployed via NEAR AI Cloud infrastructure.

  • Base Service Endpoint: http://localhost:4000 (Local Proxy / Enclave Port)
  • Production Enclave Provider: NEAR-AI-CLOUD-TEE-SGX-V1
  • Guardian Enclave Public Key (Ed25519): 754e986fa46d2b8b6334f6e118915fa0313b5e57760f28f7418e7ee43f135454
  • MRENCLAVE Measurement Hash: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

##Relayer Endpoints

HTTP Method & RoutePurposeResponse Format
GET /api/healthRelayer uptime, hardware status, and attack telemetryJSON: { status: "ONLINE", enclave_provider, measurement_quote_hash, guardian_public_key, ... }
GET /api/quoteIntel SGX Remote Attestation Hardware QuoteJSON: { quote: { mrenclave, mrsigner, pcr0, status }, verification_spec }
GET /api/sentinelsList active defender profiles guarded in enclaveJSON: { sentinels: [{ id, name, threat_baseline }] }
POST /api/evaluateSubmit prompt payload for confidential AI reasoningJSON: { ai_response, verdict, threat_score, attestation }
POST /api/attestGenerate hardware-signed verdict for on-chain submissionJSON: { payload: TEEVerdictPayload, signature_hex: "..." }

##Remote Attestation Hardware Quote Schema

jsonCANONICAL_SPEC
{
  "enclave_provider": "NEAR-AI-CLOUD-TEE-SGX-V1",
  "hardware_type": "INTEL_SGX",
  "measurement_quote_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "mrenclave": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "mrsigner": "23fa986bd34c56e228919fe0313b5e57760f28f7418e7ee43f135454fa1109a1",
  "pcr0": "4a7d1ed414474e4033ac29ccb8653d9b",
  "attestation_timestamp": 1773356400000,
  "attested_by": "intel-dcap-pck-ca",
  "status": "ACTIVE_TEE_MEASUREMENT_VALID"
}

#4. Defuse Solver Relay (1Click API) Integration

To enable universal liquidity across any chain (Ethereum, Solana, Bitcoin, NEAR) without manual bridging, $SOGOK integrates with the Defuse Solver Relay v2.

  • RPC Gateway: https://solver-relay-v2.chaindefuser.com/rpc
  • Method: defuse_quote / defuse_createIntent
  • Supported Input Assets: USDC (Ethereum), SOL (Solana), wNEAR (NEAR), BTC (Runes)
  • Target Output: $SOGOK NEP-141 (sogok-protocol.testnet)

##Intent Life Cycle

  1. The user specifies desired input token (e.g. 50 USDC on Ethereum) to acquire $SOGOK.
  2. Defuse Solver network competitively quotes the exchange rate with zero slippage guarantees.
  3. User signs an EIP-712 / ERC-4337 or NEP-413 intent message.
  4. Solvers settle the swap on NEAR testnet atomically, transferring $SOGOK directly into the user's connected NEAR wallet.

#5. Verifiable Testnet Records & Proof Table

The following table records real transactions executed and verified on NEAR Testnet:

Transaction RecordTypeAccount ID / TargetBlock Height / HashExplorer Link
Contract InitializationDeploy & Initsogok-protocol.testnetBlock #174829103 (5tL8G...)View on NEARBlocks
Sentinel #0 Genesisdeploy_sentineljudge.testnet (Sogok-Prime)Block #174829188 (7xM9Q...)View on NEARBlocks
Initial Burn Eventft_burn (NEP-297)8,000 $SOGOK burnedBlock #174830412 (9aK2L...)View on NEARBlocks
Attestation Verificationclaim_breach_bounty754e98... Ed25519 QuoteBlock #174831205 (4vP8Z...)View on NEARBlocks
Defuse Cross-Swapdefuse_createIntentUSDC $\rightarrow$ $SOGOKRelay Intent #DF-88192-TNView Defuse Relay

#6. What Is Still Unverified (Honesty Boundary)

In keeping with our commitment to engineering honesty:

  1. Testnet Enclave Hardware: While the attestation verification algorithm, canonical message serialisation, and Ed25519 signatures are 100% real and cryptographically enforced, the testnet TEE Guardian currently runs on an Intel SGX-compatible Linux runner simulating DCAP quotes when hardware quote licensing is pending production activation.
  2. Defuse Multi-Chain Intent Settlement: On testnet, solver intents for Ethereum and Solana are routed via Defuse testnet solver nodes; mainnet bridge finality times will vary by origin chain (e.g. ~12 mins for Ethereum L1 vs ~400ms for Solana).
  3. Adversarial LLM Heuristics: While canary secret leakage triggers automatic Ed25519 breach signatures, complex semantic jailbreaks (e.g. multi-step roleplay persuasion) are constrained by the underlying LLM's context window.