TrustPay
Inspiration
Online transactions between strangers often involve a trust problem. Buyers fear paying without receiving the product, while sellers worry about delivering their goods or services without getting paid. Traditional escrow services solve this issue but rely on centralized intermediaries, leading to higher costs, delays, and privacy concerns. We wanted to build a decentralized, privacy-first solution that replaces trust with transparent smart contracts while keeping sensitive transaction details confidential using Midnight.
What it does
TrustPay is a decentralized escrow platform built on Midnight. It securely locks a buyer's payment in a confidential smart contract until both parties fulfill their agreement. Once the buyer confirms the transaction, the funds are automatically released to the seller. By leveraging Midnight's privacy-preserving blockchain, sensitive contract details remain confidential instead of being publicly visible.
How we built it
We built TrustPay using React.js for the frontend, Node.js and Express.js for the backend, and integrated Midnight for confidential smart contracts and secure blockchain interactions. Users connect through Lace Wallet, create escrow agreements, view active contracts, and approve fund releases through an intuitive dashboard.
Challenges we ran into
As this was our first project on Midnight, we encountered a few practical challenges while building TrustPay. The biggest blocker was that we couldn't fully test and deploy our escrow smart contract because we didn't receive enough DUST tokens from the faucet. As a result, the frontend's Release Funds functionality couldn't complete the end-to-end interaction with the smart contract.
Another challenge was integrating the updated Lace Wallet extension. The wallet connection APIs had changed, and much of the available documentation and academy content referenced deprecated APIs. This made it difficult to identify the correct integration approach, especially when debugging wallet connection and network mismatch issues.
Accomplishments that we're proud of
- Built a complete end-to-end decentralized escrow application.
- Successfully integrated Midnight's confidential smart contract ecosystem.
- Created a clean and user-friendly interface for managing escrow contracts.
- Implemented secure wallet authentication and transaction approval flows.
- Demonstrated how privacy-preserving blockchain technology can solve real-world trust problems.
What we learned
This project gave us hands-on experience with confidential smart contracts, blockchain wallet integration, decentralized application architecture, and full-stack Web3 development. More importantly, we learned how privacy can be combined with decentralization to create practical applications that protect users without sacrificing transparency or security.
What's next for TrustPay
We plan to extend TrustPay with milestone-based payments, decentralized dispute resolution, automatic refunds, multi-signature approvals, NFT and digital asset escrow, and reputation scoring for buyers and sellers. We also aim to deploy the platform on Midnight's production network and enhance the user experience with notifications and mobile support.
Log in or sign up for Devpost to join the conversation.