SPANIRA Security

Note: The smart contract audit by an independent third party has not started yet. It must be completed before Phase II of the pilot, the first real transactions. The contracts currently run only on testnet with test tokens, and admin operations on testnet still use a single deployer key; the handover to a multisignature and a 48-hour timelock takes place before Phase II.

1. Contract Testing (Foundry, 666 automated tests)

All prototype smart contracts (DemandAssurance, DocumentaryCommitment, StandbyCommitment, ConditionalSettlement, ReceivablesLiquidity, SupplyChainFinancing, ProtocolFeeManager, ProtocolCompliance, SettlementVault, EvidenceRegistry, TradeWorkflowRegistry) are tested with Foundry: 666 automated tests (unit, fuzz and invariant) passed as of 24 October 2026. The tests cover normal flows and attack scenarios such as access-control violations, reentrancy and extreme values.

2. Static Analysis (Slither, internal)

Slither v0.11.5 was run over all core contracts and found no valid high or critical issues. Every finding was reviewed: some were false positives already mitigated by design patterns (CEI, ReentrancyGuard, SafeERC20, pull-payment), and the rest were informational or gas-related. This is internal analysis, not an audit by an independent third party.

3. Security by Design

On the testnet prototype, contract admin operations still use a single deployer key. Before Phase II, admin rights are handed over to a multisignature and a 48-hour timelock, the deployer renounces all of its roles, and the testnet admin key is rotated.
  • in every function that moves tokens, to prevent reentrancy.
  • on all token entry points.
  • separated by function, for example CHECKER, ATTESTOR and GUARDIAN. The funder (FUNDER) and disburser (UNDERWRITER) roles in the prototype are not used for customer money and are not held by SPANIRA.
  • so that authorised role holders can halt the contracts in an emergency.
  • recipients withdraw the tokens they are owed themselves, so payments cannot be blocked.
  • for non-standard tokens.
  • planned for admin operations and contract upgrades: a multisignature and a 48-hour timelock, applied before Phase II. On the current testnet prototype, admin operations still use a single deployer key.

4. Personal Data Kept Off-Chain

No personal data is written to the blockchain. Only document hashes, verification status and timestamps are recorded there. Full data is stored off-chain, encrypted, and handled in accordance with Indonesia's Personal Data Protection Law (Law No. 27 of 2022).

5. KYB/KYC Gate at the Contract Level

checks every wallet address before it can interact with a smart contract. Wallets that are unverified, on a sanctions list or frozen are rejected automatically.

6. Full Audit Trail

Every status change is recorded as a blockchain event. On the server side, SPANIRA keeps an additional hash-chained audit trail (SHA-256, append-only), so that any change can be detected. Tamper-proof storage (WORM or on-chain anchoring) and daily reconciliation with blockchain events are applied before Phase II.

7. Account Security

The protections below are already implemented in the prototype application's code. We list only what actually exists.

  • One-time sign-in codes by email. A 6-digit code is generated with a cryptographic random number generator, sent to your email, valid for 10 minutes and usable only once.
  • Attempt limits. Code requests and code checks are limited per IP address and per email address, so codes cannot be guessed repeatedly or sent in bulk. The whole API also has a per-minute request limit.
  • Wallet signature sign-in. EVM wallets use the Sign-In with Ethereum standard (EIP-4361): the server issues a single-use nonce valid for 5 minutes and checks the site domain inside the message you sign. Tron wallets sign a message with the same kind of single-use nonce. Signing the sign-in message does not move any assets and costs no network fee.
  • Protected sessions. Sessions are stored in an httpOnly cookie that page scripts cannot read, sent only over HTTPS in production, use the SameSite setting, and expire automatically. Customer sessions are separate from staff sessions and are signed with different keys.
  • Transaction access follows verification status. Transaction actions are allowed only when the company's verification is approved and has not expired. Access is refused if the company is suspended, the wallet has an AML finding, or the wallet's access to the company account has been revoked.
  • Sign-in and sign-out records. Every sign-in and sign-out is written to the audit trail. Email addresses are recorded as a hash, not in plain text.
  • Encrypted connections. The site and the API are served over HTTPS. In production the API sends an HSTS header, plus headers that stop responses from being loaded inside a frame and prevent content-type sniffing.

Not yet available in the prototype: an additional verification code for every transaction instruction. We will update this page when that is added.

Never share your sign-in code or wallet private key with anyone, including anyone who says they are from SPANIRA.