---
title: "VaultDEX: tokenised gold with an AI price oracle – Case | SolidiFi Labs"
description: "How we built VaultDEX: 12 smart contracts for tokenised gold, proof of reserve, an AI price oracle and 150+ tests, live on BNB Chain testnet."
url: https://solidifilabs.com/cases/vaultdex-tokenised-gold
language: en
alternate: https://solidifilabs.com/nl/cases/vaultdex-tokenised-gold
---

# Tokenised Gold With An AI Oracle

Twelve smart contracts to trade, settle and safeguard tokenised gold, including an AI oracle that trips a circuit breaker when prices look wrong.

## The Challenge: Bring Physical Gold On-Chain Without New Risks

Institutions want to trade and settle gold on-chain, but only if every token is backed by real bullion, only verified parties can hold it and a bad price feed can’t drain the pools. VaultDEX was designed around the requirements of a DFSA Category 3C licence.

### What we built:

- **A gold-backed token**: tGOLD, with proof-of-reserve attestations stored off-chain, minting limited to authorised agents and an optional KYC/AML whitelist.
- **An AI price oracle**: An agent submits the gold price every 60 seconds with a confidence score from anomaly detection. Low confidence triggers a circuit breaker.
- **Trading and liquidity**: An automated market maker with time-weighted prices, slippage protection, multi-hop swaps and gasless approvals.
- **Escrow settlement and governance**: Physical trades settle through a 7-state escrow with multi-sig dispute resolution; admin changes go through a multi-sig and a 24-hour or 7-day timelock.

### Our approach:

Tests carry the weight: more than 150 cases across 18 suites, covering unit, integration, security (reentrancy and flash-loan attacks), fuzzing, stress and gas use.

Settlement runs on opBNB for roughly ten times lower gas costs, while trading stays on BNB Chain.

Physical trades settle through a 7-state escrow with multi-sig dispute resolution, and admin changes wait behind a multi-sig and a timelock.

## What We Can Count About This Project

- **12 Smart contracts**: About 3,400 lines of Solidity across trading, gold, AI safety, settlement and governance.
- **150+ Tests**: In 18 suites, including fuzz and stress tests.
- **14 Verified deployments**: Contracts deployed and verified on BNB Chain testnet.

### Part Of The Stack

- **React**
- **TypeScript**

## Safeguards Built Into The Contracts

The protection doesn’t depend on someone watching a dashboard.

- **Circuit breaker**: Watches volume and suspicious patterns, opens on anomalies and recovers gradually through a test period.
- **On-chain monitoring**: Daily volume, trades, liquidity and unique traders, with alert thresholds for off-chain monitoring.
- **Custody dashboard**: Live oracle prices, circuit breaker state and the proof-of-reserve attestations in one view.
- **Timelocked governance**: Admin changes pass a multi-sig and a 24-hour or 7-day timelock.

### If the AI isn’t sure about the price, trading pauses itself.

## See Next Project

- [NADHR](https://solidifilabs.com/cases/nadhr-ai-vendor-matching): A Claude-powered platform that classifies innovation requests, blocks vendors that fail compliance controls and explains every match it makes.
- [Madini](https://solidifilabs.com/cases/madini-ai-mineral-prospectivity): A geospatial ML platform that fuses six-plus satellite and geophysical sources into ranked exploration targets, each with an uncertainty map.
- [SolidiFi FX](https://solidifilabs.com/cases/solidifi-fx-cross-border-payments): A fiat-in, fiat-out payments platform with virtual IBANs, KYC and AML screening, and settlement on the XRP Ledger that users never see.
- [SolidiFi Nexus](https://solidifilabs.com/cases/solidifi-nexus-multi-chain-wallet): One React Native codebase for 19 blockchains, Ledger signing over Bluetooth and a security model that passed two independent Cure53 audits.
- [SolidiFi Nexus web & dApp](https://solidifilabs.com/cases/solidifi-nexus-web-dapp): The web side of Nexus: a multilingual website whose pages come from a CMS, and a dApp to wrap, delegate and claim rewards on Flare.
- [SolidiFi One website](https://solidifilabs.com/cases/solidifi-one-website): The website of the SolidiFi group holding in Dubai: a Next.js site on a dedicated design system, with Markdown for AI agents and scripted, reversible deploys.

## info@solidifilabs.com

Not sure where AI fits in your business? In a free 30-minute call we look at your processes and tell you honestly what is worth building, and what isn’t.

[Email us](mailto:info@solidifilabs.com)
