Skip to content

ayushsingh82/FloatPay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FloatPay

Programmable business spending on Base.

Companies issue purpose-locked USDC vouchers to employees. Every dollar is tracked, controlled, and reconciled automatically on-chain — no cash, no cards, no reimbursement cycles.


The Problem

Corporate spending leaks money at every layer. Employees advance personal cash and wait weeks to be paid back. Finance manually reconciles paper receipts. Fleet operators lose money to fuel theft and card misuse. CFOs have no real-time view until month-end.

The root issue: money is allocated vaguely, spent freely, and verified after the fact.

How FloatPay Works

FloatPay locks money to its purpose before it moves.

A company deposits USDC into the protocol. It then issues vouchers — each tied to a specific employee, a spending category (fuel, food, travel), a merchant whitelist, and an expiry. When the employee pays a merchant by scanning a QR code, USDC transfers directly from the contract to the merchant's wallet. There is no intermediary, no card network, no reconciliation step.

Company deposits USDC
  └── creates voucher: amount + category + expiry + merchant list
        └── employee scans merchant QR → enters amount
              └── spend() → USDC goes directly to merchant wallet
                    └── unspent funds auto-return on expiry or revocation

Every action is a signed on-chain transaction. The ledger is the audit trail.


Architecture

┌─────────────────────────────────────────────────────────────────┐
│                        VoucherManager.sol                        │
│                                                                  │
│  companyBalance[address]  ──deposit()──►  USDC held in contract  │
│                                                                  │
│  createVoucher(employee, amount, category, expiry, merchants[])  │
│       └── deducts from companyBalance, locks in Voucher struct   │
│                                                                  │
│  spend(voucherId, merchant, amount)                              │
│       └── validates: category · whitelist · expiry · balance     │
│       └── transfers USDC directly to merchant wallet             │
│                                                                  │
│  revokeVoucher(id) / reclaimExpired(id)                         │
│       └── unspent returns to companyBalance                      │
│                                                                  │
│  withdraw(amount) — company pulls idle USDC back                 │
└─────────────────────────────────────────────────────────────────┘

Network: Base (L2 — low fees, fast finality)
Stablecoin: Circle USDC (6 decimals)
Contracts: Solidity + Foundry
Frontend: Next.js · wagmi v3 · viem · RainbowKit


QR Payment Flow

Merchants don't install anything. They generate a QR code at /app/merchant by entering their wallet address, business name, and category. The QR encodes a compact payload:

{ "a": "0xMerchantWallet", "n": "HP Petrol Station", "c": "Fuel" }

Employees open /app/employee, tap Spend, and scan the QR with their phone camera. The app reads the merchant details, validates category against the active voucher, and prompts for an amount. One wallet signature sends USDC from the contract to the merchant. The employee never touches their own wallet balance.


Voucher Categories

Category Enum Use case
Any 0 Unrestricted spending
Fuel 1 Fleet / petrol stations
Food 2 Meals, canteen
Travel 3 Flights, transit
Accommodation 4 Hotels
Telecom 5 SIM recharges, data

A voucher issued for Fuel cannot be spent at a Food merchant — enforced on-chain.


Use Cases

Fleet Management — Issue fuel vouchers to truck drivers locked to fuel station wallets. Zero cash handling, zero theft.

Corporate Expenses — Employees get meal or travel vouchers. Finance sees every spend in real time. Reimbursement process is eliminated.

Event Staffing — Distribute spending budgets to 100s of event staff in a single transaction.

DAO / Remote Teams — Pay contributors with scoped USDC budgets drawn from on-chain treasury.


Repository

floatpay/
├── contracts/
│   ├── src/
│   │   ├── VoucherManager.sol
│   │   └── MockUSDC.sol
│   ├── test/
│   │   └── VoucherManager.t.sol
│   └── script/
│       └── Deploy.s.sol
├── frontend/
│   ├── app/
│   │   ├── page.tsx              (landing)
│   │   └── app/
│   │       ├── page.tsx          (role selector)
│   │       ├── issuer/           (company dashboard)
│   │       ├── employee/         (spend UI + QR scanner)
│   │       └── merchant/         (QR generator)
│   └── lib/
│       └── contracts.ts          (ABIs + addresses)
└── docs/
    └── pending.md

Built on Base · Powered by Circle USDC

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors