Skip to content
Trust Bridge

Trust Bridge

Decentralized Giving for a Brighter Tomorrow

Created on 26th June 2025

•

Trust Bridge

Trust Bridge

Decentralized Giving for a Brighter Tomorrow

The problem Trust Bridge solves

Traditional donation platforms often suffer from a lack of transparency, traceability, and automation. Donors have little visibility into how their contributions are used, and trusts or NGOs often struggle with timely and fair fund allocation.

💡 What TrustBridge Does
TrustBridge solves this by combining the power of blockchain and agentic AI to create a transparent, programmable, and secure donation platform:

🔐 Creates secure onchain wallets for verified children's trusts using Coinbase CDP Wallet SDK.

🤖 Uses logic-based or AI-powered agents to suggest which trust should receive the next donation, based on wallet balance and historical activity.

💸 Allows one-click donations directly to trust wallets, with all transactions visible on-chain for full transparency.

🧠 Eliminates bias and manual fund routing, enabling a fairer and more accountable donation system.

📊 Scalable architecture for managing large networks of trusts, donors, and automated payout flows.

Challenges we ran into

While building TrustBridge, we encountered several real-world challenges both technical and conceptual that helped us better understand the nuances of building secure onchain agents.

🔐 CDP Wallet Integration Challenges
Environment Variable Bugs: Initially, CDP API credentials weren’t being recognized inside the Next.js app. We discovered that .env must be located at the root level (not inside /app), and the dev server must be restarted for changes to take effect.

Wallet Secret Format Errors: We ran into InvalidWalletSecretFormatError due to the incorrect PEM formatting of the wallet secret. Fixing this required referencing Coinbase’s example format (with proper -----BEGIN EC PRIVATE KEY-----).

AgentKit Learning Curve: While AgentKit is powerful, its abstraction made it harder to debug errors in real-time. So we pivoted to using the CDP Wallet SDK directly, which gave us full control over transaction logic and simplified integration with our frontend.

💻 UI & API Integration Issues
Next.js API Route Confusion: With the App Router, we had to restructure our backend logic under app/api/connect/route.ts. Learning the new file-based routing system was tricky at first.

Frontend Wallet Sync: Initially, our “Connect Wallet” button did not properly show the newly created wallet address due to async issues and fetch timing. We resolved this by implementing a loading state and a more defensive try/catch wrapper.

Balance Display Bugs: Displaying real-time wallet balances was buggy due to incorrect EVM formatting (wei/eth confusion), which we fixed using Viem’s parseEther and formatEther.

Tracks Applied (1)

Best Use of CDP Wallet

TrustBridge directly addresses the core objectives of the Best Use of CDP Wallet track by showcasing a real-world use ca...Read More

Discussion

Builders also viewed

See more projects on Devfolio