Profiles, unlocks, grants
Profile submission and review, unlock creation and proof, grant records, updates, and release requests.
On-chain infrastructure for creating, funding, and releasing named student grants.
Student profiles, backer workflows, grant creation, a grant state machine, release requests, and a custom escrow contract — the full lifecycle from a named opportunity to an approved release. The grant product and testnet escrow workflow are implemented and run end to end on Base Sepolia; real-money operation is intentionally disabled pending production financial safeguards.
Traditional student lending creates debt and interest for opportunities that are often small, specific, and one-time: a certification exam, a conference ticket, a piece of equipment. DefundU is the plumbing for a no-repayment alternative, where a backer funds one verified opportunity and the money is provably escrowed and released only after admin review.
No repayment, interest, yield, equity, ownership, or tradable asset — enforced as checked code paths and a dedicated money-config test suite, not just policy language.
Profile submission and review, unlock creation and proof, grant records, updates, and release requests.
The private Grant Room of approved unlocks, grant creation, the no-repayment acknowledgement, and per-grant records.
Access control, application and proof review, reconciliation, release approval, on-chain event inspection, and release executions.
A funding state machine in app/lib/money/, per-provider adapters, and a custom escrow contract deployed to Base Sepolia.
GenesisGrantEscrow.sol is a single contract that manages many grants keyed by bytes32 grant ID, with the funding token fixed at deployment and designed for USDC settlement on Base. Mock USDC and fee-token contracts accompany it for testing.
Each grant is funded exactly once. Partial funding is rejected; fee-on-transfer mismatches are rejected.
After funding, the backer has no release control. Partial release is not supported.
A restricted releaser executes release only after an off-chain admin approval; unresolved grants can be refunded.
GrantFunded, GrantReleased, GrantRefunded, and pause events are emitted for the app's on-chain listener.
The escrow flow runs on Base Sepolia with automated coverage across funding, pause, release, refund, and admin-role paths.
A grant is not treated as funded until three independent records agree. Most of the state-machine complexity is in handling partial and out-of-order confirmation.
The CAD payment confirmation, or a provider event.
The escrow's own GrantFunded event, read by the listener.
The app's money status, advanced only when the other two reconcile.
Provider adapters are in place for Coinbase, Crossmint, Stripe Onramp, Banxa, a direct-USDC rail, and the manual-CAD treasury path, which is wired end to end.
Next.js 16 and React 19 with TypeScript; API routes handle application, review, and dashboard flows.
Supabase Postgres holds application state, migrations, and the audit trail for admin actions, provider events, and on-chain events.
app/lib/money/ keeps provider-specific logic isolated from core escrow reconciliation.
Solidity via Hardhat, deployed to Base Sepolia; viem and wagmi for on-chain reads and the event listener.
The grant lifecycle, the state machine, the escrow contract, and the manual-CAD treasury rail are built and tested on testnet. Turning on real money is a deliberate, gated step — the four remaining requirements come verbatim from the contract's own README:
Independent audit of the escrow contract and an admin multisig.
Production integrations and webhook handling for the CAD and USDC providers.
Production key custody, financial controls, and monitoring.
Legal and compliance review of the grant, escrow, and release model.
The grant, escrow, and release flows run end to end on Base Sepolia.