Skip to main content

Inventory Validation

TradeArena uses on-chain inventory validation to ensure that commodity orders are backed by real, verifiable physical assets. Two types of validators operate the system, both required to stake $ARENA and maintain on-chain reputation scores.

Validator Types​

TypeWhoRole
technical_nodeSystem-level validators operated by the platformValidate protocol-level assertions: data integrity, oracle consistency, contract compliance
inventory_holderVerified companies with physical inventoryAttest to the existence, ownership, and quality of real-world commodity stock

Both validator types are registered in the inventory_validators table and subject to the same staking and slashing rules.

Validator Registration and Staking​

To register as a validator, a company must:

  1. Complete ERC-3643 identity registration — see Identity & Compliance
  2. Link a DID (Decentralized Identifier) wallet to their on-chain identity
  3. Stake a minimum amount of $ARENA (stored in inventory_validators.staked_arena_amount)
  4. Declare the inventory_categories they are qualified to validate (e.g., oil_energy, metals, agriculture)

Staked $ARENA is locked in the arena_staking table for the duration of active validator status. It is slashed on malicious attestation or failure to validate.

Planned Registration API​

POST /api/validators/register

Request body:

{
"company_id": 42,
"validator_address": "0xABCD...",
"validator_type": "inventory_holder",
"inventory_categories": ["metals", "agriculture"],
"staked_arena_amount": 10000.00
}

Validation Proof Formats​

Validators submit cryptographic proofs alongside their attestations. The platform supports four proof formats:

Proof FormatWhat It CoversStorage
ERC-721 NFTProduct test report (quality grade, lab certification)On-chain token, metadata on IPFS
Warehouse ReceiptPhysical custody of goods at a named warehouseIPFS document hash stored in inventory_validations.validation_proof
Ownership DocumentTitle deed, bill of lading, or invoice proving ownershipIPFS document hash
DID AttestationDecentralized identity claim linked to the validator's DID walletOn-chain via ERC-3643 identity registry

All documents are hashed and stored on IPFS. The IPFS CID is recorded in inventory_validations.validation_proof as a JSON object:

{
"proof_type": "warehouse_receipt",
"ipfs_cid": "Qm...",
"nft_token_id": null,
"document_hash": "0x...",
"issued_by": "0xValidatorAddress",
"issued_at": "2026-08-01T09:00:00Z"
}

Validation Lifecycle​

stateDiagram-v2
[*] --> submitted : Inventory holder submits proof
submitted --> under_review : Technical node picks up validation
under_review --> approved : Proof accepted, reputation score ↑
under_review --> rejected : Proof rejected, reputation score ↓
approved --> [*]
rejected --> [*]

Status values in inventory_validations.status: pending → approved / rejected

A rejected validation does not slash staked $ARENA unless the validator is found to have submitted fraudulent proofs. Repeated rejections lower reputation_score and can trigger automatic deregistration.

Planned API Endpoints​

MethodEndpointDescription
POST/api/validators/registerRegister as a validator (requires ERC-3643 identity)
POST/api/validators/inventory/submitSubmit an inventory validation proof
POST/api/validators/inventory/validateTechnical node: approve or reject a pending submission
GET/api/validators/listList active validators with reputation scores and categories

Submit Proof Example​

POST /api/validators/inventory/submit
{
"validator_id": "uuid-of-your-validator-record",
"inventory_type": "metals",
"inventory_value": 500000.00,
"proof": {
"proof_type": "warehouse_receipt",
"ipfs_cid": "QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco",
"document_hash": "0xabc123..."
}
}