TrustWise AI – AI-Powered Escrow Dispute Resolution with Cryptographic Proofs
Inspiration
Trust is one of the biggest challenges in online commerce. Whether it's freelance work, peer-to-peer marketplaces, second-hand goods, or digital services, disputes often arise because buyers and sellers provide conflicting claims. Today, these disputes are usually resolved using screenshots, emails, or manually uploaded documents that can be edited, forged, or taken out of context. Human arbitration is expensive, time-consuming, and often inconsistent. We wanted to answer a simple question: Can AI make trustworthy decisions if its evidence is itself trustworthy? This led us to build TrustWise AI, an intelligent escrow dispute resolution platform where AI decisions are based on cryptographically verified evidence instead of user-submitted screenshots. By combining TLSNotary, GitHub Models (GPT-4o), and Ethereum smart contracts, we created a system that automatically verifies shipment information, reasons over authenticated evidence, and securely settles escrow funds on-chain.
What it does
TrustWise AI is a full-stack escrow dispute resolution platform that combines blockchain, AI, and cryptographic verification into a single workflow.
1. Escrow Creation
A buyer creates an escrow agreement by locking funds in a Solidity smart contract deployed on the Sepolia Ethereum network. The escrow stores transaction information, participating wallet addresses, and the payment amount until the transaction is completed or disputed.
2. Dispute Submission
If a disagreement occurs, the buyer or seller opens a dispute through the React dashboard. Instead of uploading screenshots or manually collected evidence, the user only enters:
- Escrow ID
- Shipment tracking number
- Buyer claim
- Seller claim This simplifies the dispute process while preventing fabricated evidence. ## 3. Automatic Evidence Collection The backend automatically retrieves shipment information using the supplied tracking number. Rather than trusting raw web responses, the system generates a TLSNotary proof, allowing shipment data to be cryptographically verified. This ensures that the information genuinely originated from the courier's website and has not been modified during transmission. ## 4. Cryptographic Verification A Rust-based TLSNotary verifier validates:
- Authenticity of the TLS session
- Integrity of the response
- Cryptographic signatures
- Proof correctness Only successfully verified evidence is forwarded to the AI layer. This guarantees that GPT-4o never reasons over forged or manipulated shipment information. ## 5. AI Arbitration After verification, GPT-4o—accessed through GitHub Models—receives through route /dispute:
- Buyer statement
- Seller statement
- Authenticated shipment status
- Verified metadata
- Dispute context Instead of producing free-form text, the AI generates a structured arbitration result containing recommended action, confidence score, detailed reasoning, supporting evidence and explanation for the verdict The backend validates this response generated by AI in the json format and it is structured before returning it to the frontend. ## 6. Blockchain Settlement Depending on the AI recommendation: Funds are released to the seller or refunded to the buyer. The settlement transaction is executed through MetaMask, updating the Ethereum smart contract while maintaining a transparent and immutable record. ## How we built it # Frontend The frontend was developed using React and Vite, providing a responsive dashboard for managing escrow transactions and disputes. ### Dashboard The dashboard serves as the application's control center, displaying:
- Connected wallet information
- Active escrows
- Escrow status
- Dispute status
- Recent transactions ### Wallet Integration MetaMask integration allows users to:
- Connect Ethereum wallets
- Switch to the Sepolia test network
- Sign blockchain transactions
- Authorize escrow settlement Wallet state is synchronized throughout the application to provide a seamless blockchain experience. ### Escrow Management Users can:
- Create new escrow contracts
- Specify buyer and seller information
- Define escrow amounts
- Monitor contract status
All blockchain interactions are performed using Ethers.js.
Dispute Interface
- The dispute page provides an intuitive workflow where users simply enter:
- Tracking number
- Buyer claim
Seller claim
The frontend then communicates with backend APIs and displays:
AI verdict
Confidence score
Reasoning
Verified shipment information
Settlement recommendation
Arbitration Results
Rather than presenting raw JSON, the frontend visualizes AI decisions through structured UI components, making arbitration results easy to understand.
Transaction History
The history page records completed escrows and resolved disputes, allowing users to review previous transactions and settlement outcomes.
Backend
The backend was built using Node.js and Express.js, acting as the orchestration layer between blockchain, AI, and cryptographic verification.
Its responsibilities include:
- API routing
- Request validation
- Proof generation
- TLS verification
- AI arbitration
- Blockchain coordination
- Structured responses
- Centralized logging
- Automated testing ## Automatic Proof Generation Instead of requiring users to upload TLS proofs manually, the backend automatically:
- Accepts a shipment tracking number.
- Fetches shipment information.
- Generates the TLSNotary proof.
- Submits the proof for verification.
This significantly improves usability while preserving cryptographic guarantees.
TLSNotary Integration
A Rust-based verifier validates every generated proof before it reaches the AI layer. Verification includes:
- TLS transcript validation
- Cryptographic signature verification
- Response integrity checks
- Domain validation
- Supported hashing algorithms Only verified evidence proceeds further. ## AI Arbitration Engine GitHub Models provides GPT-4o, which acts as the arbitration engine. The backend constructs a structured prompt containing:
- Verified shipment data
- Buyer statement
- Seller statement
- Dispute amount
- Transaction metadata The AI returns structured JSON rather than free-form text, ensuring consistent downstream processing. ## API Design The backend exposes REST APIs for:
- Escrow creation
- Dispute submission
- Proof verification
- AI arbitration
- Settlement execution
- Health monitoring Request validation prevents malformed or incomplete submissions before processing begins. ## Reliability Features To improve robustness, we implemented:
- Centralized error handling
- Request logging
- Response standardization
- Retry mechanisms
- Deterministic demo mode
- Integration testing
- Structured validation
These features make the system easier to debug and maintain while improving reliability during demonstrations.
# System Architecture
text Buyer / Seller │ ▼ React Frontend (Dashboard) │ ▼ Express Backend API │ ├────────► Tracking Fetcher │ ├────────► TLSNotary Proof Generation │ ├────────► Rust TLSNotary Verifier │ ├────────► GPT-4o (GitHub Models) │ ▼ Structured Arbitration Decision │ ▼ Ethereum Smart Contract │ ▼ MetaMask Settlement
Challenges we ran into
Developing TrustWise AI required integrating technologies that rarely appear together in a single application. Our major challenges included:
- Integrating a Rust-based TLSNotary verifier with a JavaScript backend.
- Automatically generating cryptographic proofs instead of relying on manual uploads.
- Designing APIs capable of handling verifier failures, AI failures, and blockchain failures gracefully.
- Coordinating frontend, backend, and Solidity development across multiple contributors while managing Git merges.
- Ensuring GPT-4o only consumed authenticated evidence.
- Synchronizing blockchain settlement with AI decisions.
- Building a smooth user experience despite the complexity of cryptographic verification happening behind the scenes.
Accomplishments
Throughout this project, we successfully designed and implemented a complete end-to-end AI-powered escrow dispute resolution platform that combines blockchain, cryptographic verification, and large language models into a unified workflow.
Our key accomplishments include:
- Built a full-stack application using React, Vite, Node.js, and Express.js, providing an intuitive user experience for escrow management and dispute resolution.
- Developed secure Solidity smart contracts deployed on the Ethereum Sepolia network to lock, release, and refund escrow funds.
- Integrated MetaMask to enable seamless wallet connectivity, transaction signing, and blockchain settlement.
- Automated shipment evidence collection by generating TLSNotary proofs directly from shipment tracking numbers, eliminating the need for manually uploaded screenshots or documents.
- Successfully integrated a Rust-based TLSNotary verifier with the Node.js backend, ensuring that only cryptographically verified evidence is processed.
- Built an AI-powered arbitration engine using GPT-4o through GitHub Models, capable of analyzing verified shipment information alongside buyer and seller claims to generate structured, explainable dispute resolutions.
- Implemented a backend orchestration layer responsible for request validation, proof generation, cryptographic verification, AI reasoning, blockchain coordination, centralized logging, and standardized API responses.
- Designed a responsive frontend featuring wallet integration, escrow creation, dispute submission, AI verdict visualization, settlement execution, and transaction history.
- Added robust engineering practices including centralized error handling, request logging, structured validation, retry mechanisms, and automated integration testing using Jest and Supertest.
- Successfully integrated technologies written in JavaScript, Rust, and Solidity, demonstrating reliable communication across multiple services and programming languages.
- Created a trust-first architecture where AI decisions are grounded in cryptographically verified evidence, significantly improving transparency and reducing reliance on potentially manipulated user-submitted data.
Above all, we're proud of demonstrating how AI, cryptographic verification, and blockchain can work together to build a more transparent, explainable, and trustworthy digital dispute resolution system.
What we learned
This project significantly expanded our understanding of modern trustworthy AI systems.
We gained practical experience with:
- Full-stack application architecture
- React and Vite
- Node.js and Express
- Solidity smart contracts
- Ethereum wallet integration
- Ethers.js
- GitHub Models and GPT-4o
- Prompt engineering for structured AI outputs
- TLSNotary cryptographic verification
- Rust service integration
- REST API design
- Automated integration testing with Jest and Supertest
- Secure blockchain workflows
- Collaborative software engineering across multiple technologies
Most importantly, we learned that AI becomes substantially more reliable when its decisions are grounded in cryptographically verifiable evidence instead of user-provided data.
What's next for TrustWise AI
We envision TrustWise AI becoming a universal trust layer for online commerce.
Future improvements include:
- Support for multiple courier providers and logistics companies.
- Integration with major e-commerce and freelance platforms.
- Multi-agent AI arbitration for more nuanced decision-making.
- On-chain storage of cryptographic verification hashes.
- Decentralized arbitration history for transparency.
- Human appeal workflows for exceptional cases.
- Support for additional verifiable data sources such as invoices, payment confirmations, digital contracts, and identity proofs.
- Reputation scoring based on verified transaction history.
- Cross-chain escrow support beyond Ethereum.
Built With
- ai
- blockchain
- cargo
- css
- docker
- ethereum
- ethers.js
- express.js
- gpt-4o
- html5
- javascript
- jest
- metamask
- node.js
- openai-sdk
- react
- rest-api
- rust
- sepolia
- solidity
- supertest
- tlsnotary
- vite
- websockets
Log in or sign up for Devpost to join the conversation.