Inspiration

The primary catalyst for TrueLedger was the sheer opacity of macro-level public finance. Once a government allocates a massive budget, tracking the "trickle-down" of every single rupee through departments, contractors, and sub-contractors becomes a black box. The current system relies on easily falsifiable paperwork, leading to delayed audits, unreturned surplus funds, and rampant corruption. We wanted to build a system from first principles where financial solvency, domain-specific spending, and task verification were mathematically enforced by a blockchain, rather than relying on blind trust.

What it does

TrueLedger is a fully transparent, decentralized fund and task allocation platform that operates on a strict Three-Tier Governance Model:

  1. The Government (Level 0): Acts as the sovereign treasury. It monitors total reserves, adjudicates budget requisitions from departments, and enforces macro-solvency (ensuring unallocated reserves never drop below zero).
  2. The Regulators (Level 1): Department heads (e.g., Healthcare, Infrastructure) who manage domain-specific pools. They broadcast tasks, audit submitted work, and request top-up budgets from the government when funds run low.
  3. The Taskholders (Level 2): Field executors who accept localized tasks, execute the work, and upload verifiable completion proofs to decentralized storage.

Crucially, TrueLedger features an on-chain Surplus Return mechanism—if a taskholder spends less than their allocated budget, they seamlessly return the remaining surplus back to the public treasury via a smart contract call.

How we built it

We engineered the core infrastructure entirely on the Aptos Devnet using the Move smart contract language to handle the sovereign treasury, budget requisitions, and task lifecycle.

  • Frontend & UX: We built the client using React 18, TypeScript, Vite, and Tailwind CSS. We focused heavily on UI/UX aesthetics to ensure the platform feels like a modern SaaS product rather than a clunky Web3 tool.
  • Storage: We integrated IPFS via Pinata for immutable, safe web3 storage of all audit proofs and receipts.
  • Architecture: We applied strict SOLID design principles to the client layer—using Repository, Observer, State Machine, and Facade patterns. This allowed us to keep the UI perfectly synchronized with ledger events in real-time without database timeout bottlenecks.
  • Wallet: Integrated the Petra Aptos Wallet for signing transactions.

Challenges we ran into

  • State Synchronization: Keeping the UI strictly synchronized with on-chain state changes across three different user roles without relying on a centralized database required careful implementation of the Observer pattern and event listeners.
  • Gas Optimization: We had to optimize our Move entry functions to ensure micro-gas efficiency. We successfully tuned the architecture to cost < 0.005 APT per transaction by utilizing a pure event-emitting model that eliminated table handle timeout bottlenecks.
  • Domain Isolation: Building a seamless development and testing environment where a single wallet could switch between "Government", "Regulator", and "Taskholder" roles without breaking domain-authorization guards took significant architectural planning.

Accomplishments that we're proud of

  • 100% Pure On-Chain Execution: We successfully moved the entire financial adjudication and auditing loop on-chain. Every rupee requested, allocated, spent, and refunded is immutably recorded on Aptos.
  • The Return Surplus Feature: We are incredibly proud of the return_surplus contract function. In traditional systems, unspent public money simply disappears; in TrueLedger, we mathematically enforce its return to the department pool.
  • Sub-Second Simulation Times: By optimizing the Move contracts, the platform feels instantaneous, bridging the gap between deep technical Web3 rigor and clean, web2-style usability.

What we learned

  • Move Language Paradigms: We deepened our understanding of resource-oriented programming in Move, specifically how to safely handle digital assets and strictly control access via domain authorization checks.
  • Decentralized State Machines: We learned how to map complex real-world workflows (like a multi-stage government audit process) into a secure, deterministic on-chain state machine.
  • IPFS Integration: We gained hands-on experience bridging on-chain ledger data with off-chain cryptographic file storage (IPFS CIDs) for verifiable document viewing.

What's next for TrueLedger

  • Mainnet Deployment: Transitioning the smart contracts from Aptos Devnet to Mainnet for live, real-world pilot programs.
  • Zero-Knowledge (ZK) Audits: Integrating ZK-proofs so that whistleblowers or third-party auditors can verify compliance and flag anomalies without exposing sensitive operational data.
  • Mobile Ecosystem: Building an Expo React Native mobile app for Field Taskholders, allowing them to capture geolocated photos and instantly upload completion proofs directly from construction sites or project locations.

Built With

  • aptos
  • move
  • pinata
  • react
  • tailwind
Share this project:

Updates

Submission history