Inspiration
We’re all trying to lead great lives, but sometimes unexpected events may cause us to face accidents or terminal illness, leaving our family members without a source of income to provide for them. This is where life insurance becomes valuable, taking care of expenses if anything were to ever happen, a market that 52% of Americans participate in and an industry well worth over $750 Billion.
Traditional life insurance is frustrating, consisting of many phone calls and medical exams over the course of 4 to 6 weeks, and can also have a high risk of claim denials where death is not reimbursed. Ghost protocol solves this, being built using Chainlink functions and a subgraph to offer many different insurance contracts, each with different prices, lengths of coverage, and payout which can be entered immediately upon giving basic information from a user.
What it does
Given the pool of users in the policy, we calculate the health of the protocol based on the risk of the users and the likelihood that someone will have to exercise their contract. Our solution allows for better In order to track if someone has passed away, we take in a person’s SSN and query it using Chainlink functions in an API database to see if they have passed away in the government database, streamlining the process. Then, their dependents whose wallets have been written into the contract as having access to money when the contract was created will then automatically be able to connect from the vault.
We also give users the opportunity to make their own policies because we believe that the best policy will win through democratization, but our suggested price of the insurance is calculated optimally. We’ve fine-tuned a standard select survival model that calculates the probability of death based on parameters like age and gender. The price is then calculated by discounting back the payout, multiplying by the probability of death, expected interest rates and calculating NPV. We expect many users to want to create their own insurance policies, so we have created a Subgraph to be able to index the insurance policies given the wallet address of the user who has signed the contract in order to query and sort the subgraph based on the health of the protocol and total value of the pool to show plans that are more secure on top and allow users to filter through different plans that are created in real-time.
How we built it
On the front-end, we used React and Typescript to create the website and connected it to our backend and smart contracts using Ethers.js. Our project involves three smart contracts, the Forest as well as two others Ghost Policy and Ghost Claim Verifier which were both written in Solidity and deployed on the Sepolia. The graph components were written in GraphQL and Typescript.
Challenges we ran into
From the get go, the insurance protocol was a matter of debate between the team members. Although traditional insurance is certainly archaic in many ways, they are no stranger to using complex mathematical models to maximize profits as they look to absorb the risk of policyholders. We looked to find simpler models of measuring policyholder risk and policy health while maintaining efficiency for on-chain computation.
The Graph posed a challenge in that we were unable to get the Graph CLI to install on a few of our systems, while it did work on one of our team member’s machine. We also foresaw a great use case for a the Graph subgraph for our Ghost policies, but it is obviously only truly useful when our protocol begins to become more widely adopted.
What we learned
Through this project, we learned about insurance policies and deploying protocols which we have not used like Graph, which has instrumental in broadening our understanding of blockchain and the decentralized finance landscape. Through our exploration of insurance policies, we gained insights into the intricate mechanisms underlying risk assessment, coverage determination, and claims processing. Understanding these fundamentals not only enriched our knowledge of the insurance industry but also provided a solid foundation for innovating within this space to make something better than the status quo.
The Graph protocol, with its capabilities in decentralized querying of blockchain data, opened our eyes to the power of decentralized networks and the potential they hold for revolutionizing various industries, including finance and beyond. We also really enjoyed working on Chainlink's functions and doing more advanced connections to real-world APIs. Our journey as a team has been marked by valuable lessons in collaboration, communication, and effective task delegation. Working together on a complex required a cohesive team effort, where each member brought their unique skills and perspectives to the table. Through constant communication, constructive feedback, and mutual support, we were able to navigate challenges, iterate on ideas, and ultimately deliver a product we are proud of.
What's next for Ghost Protocol
In the future, we hope to be able to increase analytical capabilities on the subgraph and have more sophisticated risk modelling for insurance. We also envision our protocol expanding to accept more tokens as payment other than just Ethereum and offering a feature of allowing liquidity providers to deposit funds in the insurance policy without having to engage in the contract for a premium in return.
Log in or sign up for Devpost to join the conversation.