AnticiPay

AnticiPay is a crowdfunded, adaptive disaster relief streaming platform

AnticiPay

Created At

HackMoney 2026

Project Description

AnticiPay is an innovative blockchain-based humanitarian finance platform that combines anticipatory disaster relief streaming with crowdfunded community treasuries. The platform autonomously creates individual smart contracts for each disaster-prone community, enabling donors worldwide to contribute via multiple tokens while recipients automatically receive settlements in USDC. In AnticiPay disaster-prone community receives its own dedicated smart contract that functions as an autonomous treasury, accepting donations in both ETH and USDC while tracking funding progress and managing beneficiary withdrawals. These individual community contracts are orchestrated by a master contract called CommunityTreasury.sol, which handles the creation of new communities, routes donations to their appropriate destinations, and maintains a comprehensive registry of all active fundraising initiatives. To enhance user experience, every community contract is registered with Ethereum Name Service (ENS), transforming complex wallet addresses into memorable names like "kathmandu-flood-relief.eth" that donors can easily share and remember. The platform's donation mechanism leverages Li.Fi, a cross-chain liquidity aggregator, to accept contributions in virtually any blockchain token from any network. When donors initiate a transaction, Li.Fi automatically detects their token type, originating blockchain, and contribution amount, then orchestrates the necessary token swaps and cross-chain bridges behind the scenes. Critically, all funds are converted to USDC before settling in the community contract treasury, ensuring standardized accounting, predictable streaming calculations, and clear financial records. This architecture eliminates technical barriers for donors while maintaining rigorous financial standardization for community treasuries and beneficiary payments.

How it's Made

Building AnticiPay required orchestrating blockchain technologies, Web3 libraries, and cross-chain protocols into a cohesive ecosystem. The foundation rests on creating a dynamic contract factory pattern where a master CommunityTreasury.sol contract deploys individual Community.sol instances for each disaster-prone region, eliminating the need to modify core logic as new communities join the platform. This scalable architecture is written in Solidity leveraging OpenZeppelin's IERC20 interface to enable each community contract to receive both ETH and USDC donations.

The frontend was built from the ground up with Next.js 14 and TypeScript, styled with Tailwind CSS for mobile-first responsive design. We integrated wagmi annd ethers.js as the Web3 backbone, paired with RainbowKit to support multi-wallet connectivity across MetaMask, WalletConnect, and Coinbase Wallet. React Query handles real-time data fetching and state management. The standout feature is our custom LiFiDonateWidget component, which wraps the @lifi/widget library to enable donors to contribute in virtually any token from any blockchain. This required wrestling with Li.Fi's strict TypeScript definitions around the toAddress parameter—we resolved this by properly typing the WidgetConfig interface and using appropriate type assertions to match Li.Fi's expected input formats.

Li.Fi proved to be a game-changing partnership because it eliminates the technical friction that would normally prevent mainstream donors from participating. Instead of asking users to learn about token swaps and cross-chain bridges, Li.Fi automatically detects their source token, originating blockchain, and contribution amount, then orchestrates the necessary conversions and transfers seamlessly. We configured the widget to settle all donations exclusively in USDC ensuring standardized accounting across every community treasury. Complementing this donation flow is our ENS integration via custom ens-utils.js, which registers human-readable names for each community contract. This transformation from cryptic hexadecimal addresses to memorable names like "kathmandu-flood-relief.eth" required careful setup of ENS registrar interactions and proper name encoding using ethers.js signers.

background image mobile

Join the mailing list

Get the latest news and updates

AnticiPay | ETHGlobal