HoneyCoin lets users mint HNY tokens, redeem them for real honey, and track fulfillment on-chain.
HoneyCoin bridges blockchain with the real world by letting users mint, trade, and redeem tokenized honey. Unlike most commodities, honey has an infinite shelf life, making it uniquely suited as a stable, redeemable asset on-chain.
When users purchase or earn HNY, they hold it in their wallet like any ERC-20 token — but unlike abstract tokens, HNY maps to real jars of honey stored at trusted farms. Each honey batch is tied to a QR-code hash for traceability and authenticity. Through HoneyCoin’s dashboard, users can:
Mint HNY tokens when new honey is produced.
Redeem HNY by submitting delivery or pickup requests, fulfilled directly by beekeepers.
Buy HNY with Solana (devnet) while receiving minted tokens on Ethereum-compatible wallets.
Track live honey batches, ensuring transparency, authenticity, and accountability.
This design makes HoneyCoin a real-world asset protocol: physical honey becomes liquid, tradeable, and trackable like any crypto asset. Because honey never spoils, it can function as a durable store of value while still being redeemable as a tangible product.
On top of that, HoneyCoin empowers sustainable beekeeping by giving farmers fair, global market access through tokenization. Consumers gain a trustless way to invest in and redeem real-world honey, while farmers benefit from new liquidity and income streams.
How it’s Made
Smart contracts (Solidity, OpenZeppelin, Hardhat, Sepolia). We ship two contracts:
HoneyToken (ERC-20) the on-chain representation of honey (HNY). It uses OpenZeppelin for safety. Core flows:
mint(to, amount) farm/owner mints HNY when real honey is produced.
submitRedeem(amount) user burns HNY to request physical redemption.
fulfillRedeem(redeemId, qrHash) farm marks a redemption fulfilled, storing a bytes32 QR/content hash with an on-chain timestamp.
A simple mapping redemptions[id] and redeemCounter track requests.
HoneyMarketplace a thin on-chain entry point for buys (kept minimal for the hack; can be extended to accept stablecoins or oracle-priced swaps).
We develop with Hardhat, deploy to Sepolia, and copy compiled ABIs into the frontend for type-safe calls via ethers v6.
Frontend (React + Vite + Privy + ethers). The UI is a Vite React app. Privy handles auth and embedded wallets, so anyone can sign in with email/social and get a non-custodial EVM wallet. On load we:
usePrivy() / useWallets() to log in and obtain an EIP-1193 provider.
Wrap it in ethers.BrowserProvider to get a signer.
Auto-switch to Sepolia (w.switchChain('eip155:11155111')).
Read/write contract state (balance, submit redeem, owner mint/fulfill).
We expose two dashboards:
User Dashboard – shows HNY balance, submits off-chain redemption details (delivery/pickup), and also provides a button to burn HNY on-chain (submitRedeem).
Farm Dashboard owner-only controls to mint HNY and fulfill redemptions (attach QR hash that maps to the physical batch).
Backend (Node/Express, simple REST). To keep shipping speed high, delivery and pickup details are stored off-chain behind a tiny REST API:
GET /api/redemption-requests | POST /api/redemption-requests
GET /api/honey-batches Vite’s dev proxy routes /api/* → localhost:<backend-port> so we avoid CORS while developing. The backend can listen to on-chain events (RedeemSubmitted, RedeemFulfilled) to reconcile state and attach richer metadata (shipping label, tracking link, photo proof).
Media & proof (QR hash + optional object storage). Each fulfillment stores a bytes32 qrHash on-chain. The actual QR image (or PDF shipping label / photo proof) is stored off-chain (e.g., S3 / IPFS / Walrus). The hash in the contract acts as a tamper-evident pointer: the UI can fetch the asset and verify its hash locally.
Solana + PayPal USD path (hack mode). We prototyped a Solana Pay panel to accept devnet payments (future: PYUSD rails). For the hackathon, we ship a demo mode:
VITE_DEMO_MODE=true enables a mock payment intent generator that renders a dummy QR and auto-advances status (created → pending → confirmed) so we can demo end-to-end without a running Solana backend.
When real endpoints are ready, the panel flips to POST /api/solana/payment-intent and polls /api/solana/payment-status.
Why honey works technically. Honey’s infinite shelf life means the asset doesn’t degrade, making it unusually well-suited for tokenization as a redeemable store of value. We pair that with on-chain auditability (events + hashes) and off-chain logistics (addresses, courier labels) to keep gas low and UX simple.
What was hacky (but effective).
Demo switch: a single env flag (VITE_DEMO_MODE) lets us run the QR/intent flow with zero backend, great for live demos.
ABI shipping: we copy Hardhat artifacts directly into frontend/src/abi/ to avoid path issues during rapid iteration.
Owner handoff: if the deployer isn’t the Privy wallet, we call transferOwnership() so the embedded wallet can mint/fulfill during the demo.
Minimal marketplace: we stubbed the buy flow to keep scope tight; the interface is ready to accept PYUSD/USDC with a simple approval+purchase path later.
Stack summary.
Solidity (0.8.x), OpenZeppelin, Hardhat, Sepolia
React + Vite, Privy (embedded wallets), ethers v6, Axios
Node/Express for REST; optional Walrus/IPFS/S3 for images/proofs
ENV-driven config: chain ID, contract addresses, demo toggle
Result. A full loop from mint → hold → redeem → fulfill where the physical good is traceable by on-chain events and content hashes, while UX stays familiar: email login, one-click wallet, and a clean web app.