Tsede Pay
A crypto payment processor that never holds funds. A stateless Solidity router forwards each payment straight to the merchant, and a reorg-aware indexer matches the on-chain receipt to the payment request.
The problem
Payment processors usually take custody, which makes them a target and makes merchants trust them. And an indexer that marks a payment settled too early loses money the first time the chain reorganises.
How it works
PaymentRouter has no owner, no storage, no upgrade path and no withdraw function, so there is nothing for an operator or an attacker to take. It emits one event per payment and reports the merchant's balance change, so a fee-on-transfer token shows up as an underpayment.
The indexer walks forward from the deployment block and records what it sees append-only. On a reorg it marks the affected rows orphaned and recomputes each payment's state from what survives. Amounts are stored as 78-digit numerics, never 64-bit integers.
- Payer's wallet to PaymentRouter: payToken(requestId, merchant, token, amount)
- PaymentRouter to Merchant: Funds forwarded in the same call
- PaymentRouter to Indexer: PaymentReceived event
- Indexer: Wait for confirmations, survive reorgs, mark it paid
What I worked on
- The contract and its tests: payments, fee-on-transfer tokens, a re-entrant merchant, and a test that reads the compiled ABI to assert no fund-moving function exists.
- The payment state machine as a pure, tested function.
- The indexer engine, the chain adapter and the Prisma schema.
Security notes
- Testnet target only (Base Sepolia). Not audited, and not for real funds.
- The deployer key signs one transaction and holds no privilege afterwards. Secrets go in Hardhat's keystore, not in .env files.
- In progress: the router's testnet address is not published yet, and there is no checkout page.
Where it stands
Contract, state machine and indexer are written and tested. Testnet deployment and the checkout page come next.