Skip to content

Venrable18/AirClaim

 
 

Repository files navigation

AirClaim: Revolutionizing Flight Delay Insurance with Blockchain Technology

AirClaim represents a paradigm shift in the flight insurance industry, leveraging blockchain technology on the Flare network to create a transparent, efficient, and trustless system for flight delay compensation. This innovative platform addresses the longstanding frustrations of traditional flight insurance: complex claim processes, delayed payouts, and lack of transparency. It also allows paasengers to play a mini game of predicting numbers and winning prizes

Core Technology and Infrastructure

At its foundation, AirClaim utilizes smart contracts deployed on the Flare network, specifically on the Coston2 testnet as indicated in the project configuration. The primary contract, insuredFlightsAgency.sol, manages the entire insurance lifecycle from insurance creation to claims processing.

The system integrates with Flare's Data Contract (FDC) protocol and AviationStack API, which serves as a decentralized oracle network providing verified real-time flight data. This integration is crucial as it allows the platform to access trusted external data about flight statuses without relying on centralized authorities.

Currently the system delayed insurance time is set to 30 minutes,

Insurance Mechanism

The insurance process begins when a user insures a flight by calling the insureFlight function. This requires several key pieces of information:

  • Aircraft ICAO code
  • Flight number
  • Passenger addresses
  • Flight price
  • Proof of flight status from the FDC

The premium calculation follows a straightforward formula: 10% of the flight price multiplied by the number of passengers, plus a base insurance fee. This transparent pricing model ensures users understand exactly the insurance system works.

When a flight is insured, the system creates an InsuredFlight struct containing all relevant flight details, including departure and arrival airports, flight date, and initial status. Each insured flight receives a unique ID for tracking purposes.

Airclaim Dashboard

Real-time Flight Monitoring

One of AirClaim's most powerful features is its ability to monitor flight statuses in real-time. The checkFlightDelay function allows either the insurer or insured passengers to verify the current status of a flight using data from aviation APIs.

The verification process works as follows:

  1. A user requests flight status verification
  2. The system fetches data through Flare's Data Contract protocol
  3. The data is verified using cryptographic proofs
  4. If the flight is delayed beyond the threshold (default 30 minutes), the status is updated insurance claim is triggered for passengers to claim their insurances

This monitoring can occur at 10-minute intervals, ensuring timely updates while preventing excessive API calls.

Automated Claims Processing

When a flight is confirmed delayed beyond the threshold, the smart contract automatically updates the flight status. Passengers can then claim their compensation by calling the claimInsurance function with their insured flight ID.

The claims process includes several validation checks:

  • Verifying the flight status is no longer "scheduled"
  • Confirming the passenger is insured for that flight
  • Ensuring the flight delay exceeds the threshold
  • Checking the passenger hasn't already claimed compensation

Also passenger has an option of winning extra prizes if they can predict a number between 1-20. If the prediction is correct, they win 0.5FLR Token, otherwise, they loose 50% of their insurance claim.

Claim Modal

Upon successful validation, the contract automatically transfers the compensation amount (10% of the flight price) directly to the passenger's wallet. This entire process occurs without human intervention, eliminating the bureaucracy and delays associated with traditional insurance claims.

Frontend Integration

The project includes a modern web interface built with React, allowing users to interact with the smart contracts seamlessly. The frontend communicates with the blockchain using ethers.js and manages wallet connections through a custom provider.

Key frontend features include:

  • Flight search and insurance purchase
  • Real-time flight status monitoring
  • Insurance policy management
  • Claim submission and tracking

The interface is designed to be user-friendly, abstracting away the complexity of blockchain interactions while maintaining full transparency about the insurance process.

Security Considerations

AirClaim implements several security measures to protect both users and the platform:

  • Ownership controls for administrative functions
  • Time-based rate limiting for flight status checks
  • Cryptographic verification of flight data
  • Validation checks throughout the insurance lifecycle

The smart contracts follow best practices for Solidity development, as evidenced by the project's adherence to solhint recommendations and compiler version specifications.

Future Potential

While currently deployed on Flare's testnet, AirClaim has significant potential for mainstream adoption. The platform could expand to cover additional travel disruptions beyond delays, such as cancellations or missed connections, raffle draws for flight passengers when the flight is yet to depart and winners annouced when flight arrives.

Also features like different data assets that allows passengers have options of assets to claim funds either through insurance or raffle draw.

Integration with more data sources and airlines could further enhance the platform's capabilities, potentially revolutionizing how travel insurance operates globally. The transparent, automated nature of blockchain-based insurance could significantly reduce operational costs for insurers while providing better service to travelers.

By eliminating intermediaries and automating claims processing, AirClaim represents not just an improvement to existing flight insurance but a fundamental reimagining of how risk can be managed in the travel industry through decentralized technology.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 82.3%
  • Solidity 13.1%
  • CSS 2.3%
  • JavaScript 1.8%
  • Other 0.5%