FlightStakeFi

World's first DeFi protocol for air travel, unlocking your airtickets for DeFi capabilities.

FlightStakeFi

Created At

ETHGlobal Buenos Aires

Project Description

FlightStakeFi tokenizes flight tickets as NFTs, unlocking three powerful DeFi primitives: šŸ“ˆ Stake - Earn yield by staking your flight tickets šŸ’° Borrow - Get instant USDC loans using tickets as collateral šŸ›’ Trade - Buy and sell tickets on a decentralized marketplace FlightStakeFi s a decentralized application (DApp) that enables passengers to unlock the financial value of their airline tickets through blockchain technology by use of worldID, chainlink and privy. The platform allows users to restake tickets to earn rewards, borrow USDC against ticket collateral, and trade tickets on a peer-to-peer marketplace. Built with a modern full-stack architecture, the application combines DeFi mechanics with traditional travel ticketing to create a novel financial instrument. The smart contracts enable passengers to unlock the financial value of their airline tickets through DeFi

How it's Made

šŸ› ļø Tech Stack Frontend Next.js 16 - React framework with App Router Tailwind CSS - Modern UI styling Privy - Web3 authentication & embedded wallets Wagmi + Viem - Ethereum interaction layer WorldID - Proof of personhood verification Backend Node.js + Express - RESTful API server Prisma + PostgreSQL - Database & ORM Ethers.js - Blockchain interaction Event Indexer - Real-time on-chain event monitoring Smart Contracts Hardhat 3 - Development framework Solidity 0.8.28 - Smart contract language Chainlink Functions - Decentralized price oracle OpenZeppelin - Security-tested contract libraries šŸ”§ Key Integrations

  1. WorldID šŸŒ Implementation: Proof of personhood verification for Sybil resistance

Frontend: IDKit Widget integrated in Navbar dropdown Backend: Cloud proof verification endpoint (/api/auth/worldid/verify) Database: isWorldIdVerified flag on User model Flow: Users verify once, status persists across sessions

  1. Chainlink Functions šŸ”— Implementation: Decentralized price oracle for real-time flight ticket valuation

Contract: PricingOracle.sol extends Chainlink FunctionsClient Flow: Contract requests price update via Chainlink Functions JavaScript source code fetches flight data from APIs Price calculated with risk factors (departure time, route, etc.) Callback updates on-chain price mapping Features: Automatic price updates, error handling, request tracking

  1. Privy šŸ” Implementation: Seamless Web3 authentication with embedded wallets

Provider: Wraps app in PrivyProvider with email/Google login Features: Auto-creates embedded wallets for non-crypto users Email/Google OAuth (no wallet required) Integrated with Wagmi for transaction signing Dark mode UI with custom branding Chain: Sepolia testnet

  1. Hardhat 3 āš™ļø Implementation: Modern smart contract development & deployment

Config: TypeScript-based configuration Contracts: TicketNFT.sol - ERC721 tokenization LendingPool.sol - Collateralized lending StakingVault.sol - Yield staking Marketplace.sol - P2P trading PricingOracle.sol - Chainlink integration LiquidationEngine.sol - Automated liquidations Scripts: Deployment, configuration, and testing utilities

background image mobile

Join the mailing list

Get the latest news and updates