Inspiration

Traditional credit systems are gatekept by centralized institutions — millions of people worldwide transact daily but have no way to build a portable financial reputation. We asked: what if every payment you made contributed
to an on-chain identity that you own, and that identity could unlock real financial utility like buy-now-pay-later?

What it does

TrustPay is a merchant payment platform on TRON where every purchase builds an on-chain trust score. As customers shop and pay, their score grows — unlocking progressively better BNPL installment terms. Merchants get paid in full upfront (funded by a liquidity pool), customers get flexible payment plans, and liquidity providers earn
yield from repayments. Three roles, one flywheel.

How we built it

We wrote five interdependent Solidity smart contracts — MockUSDT, TrustScore, MerchantRegistry, LPPool, and
BNPLContract — deployed to the TRON Nile testnet via TronBox. The trust score formula weighs payment count, transaction volume, account age, and defaults to produce a single composite score mapped to four tiers.

The frontend is a React + Vite app styled with Tailwind CSS. All state lives on-chain or in localStorage —
there's no backend server. We integrated TronLink for wallet connectivity and built custom hooks for polling contract state and computing trust scores in real time.

Challenges we ran into

  • Cross-contract authorization: Getting five contracts to trust each other in the right order during deployment
    required careful sequencing in our migration scripts.
  • TRON/EVM differences: TronLink's API surface differs from MetaMask in subtle ways — address encoding, event
    parsing, and transaction confirmation patterns all needed TRON-specific handling.
  • BNPL fund flow: Ensuring the LPPool correctly funds merchants upfront while tracking per-installment repayments back to LPs without rounding errors took several iterations.

What we learned

  • How TRON's TRC-20 ecosystem and TronBox tooling compare to Ethereum/Hardhat workflows
  • Designing a composable on-chain credit primitive that balances simplicity with meaningful scoring
  • Building a fully decentralized app with no backend — every read and write goes through smart contracts

What's next

  • Mainnet deployment with real USDT
  • Cross-merchant trust score portability — shop anywhere, carry your reputation
  • Governance over scoring parameters so the community can tune tier thresholds
  • Mobile-first PWA for emerging market adoption

Solidity 0.8.24, TronBox, TronWeb, TRON Nile Testnet, TronLink, OpenZeppelin Contracts

Frontend: React 19, Vite, Tailwind CSS, JavaScript (ES Modules)

Tooling: Node.js, npm

Built With

Share this project:

Updates