Help people victims from natural disasters - Restoring Hope, Empowering Lives, Ensuring Resilience
Prize Pool
SafetyFirst is a groundbreaking decentralized application (Dapp) designed to address the urgent needs arising from natural disasters such as earthquakes and tsunamis. Our platform is committed to providing swift financial assistance to victims in times of crisis, aiming to make a meaningful impact on their road to recovery.
We introduced a donation process by introducing a user-friendly monthly subscription system on web3 platform. Users have the flexibility to set their monthly contribution amounts, ensuring a hassle-free and consistent approach to supporting disaster relief efforts. Subscription cancellation is made easy, empowering users with control over their contributions.
Finally, SafetyFirst goes beyond financial aid; we've implemented an innovative alerting system for real-time communication during disasters. Victims can use the platform to notify the community about their need for assistance. Individuals willing to help can also use the system to offer their support to those affected, fostering a sense of community-driven aid.
A smart contract centralized the list of disasters allowing anyone to see the current natural disaster that have occured around the world.
To manage those natural disaster, we have two mechanism:
For our smart contract, we deployed it on Optimism Mainnet and Mumbai testnet. Here you can find information about it: SafetyFirst - https://optimistic.etherscan.io/address/0xdf310337db8d32555cc0042e4e7238a1319b94be Prof verification and claim tx - https://optimistic.etherscan.io/tx/0xe88aa9967e5c7d0a444ee1ca4e0f470bf6b9fdc4dbf4efacdd9ae50bc332d03e
USDC test token (free mint, verified) https://mumbai.polygonscan.com/address/0x25d6043b08892cC5f96A44f423Ac614379DBf27f
SafetyFirst test contract v.1 (verified) https://mumbai.polygonscan.com/address/0xd804562F11140d330456A68665BD6e0e19636e48
For the trigger creation with chainlink, here an example of the expected interaction with the API and our smart contract:
https://mumbai.polygonscan.com/address/0xc8b457f6e20e4cd95bf1c5dcd1cacbdc33a246c3#events
To have access to the natural disaster information, we are using the Graph. This provided us an efficient ways to retrieve those data and show it to the end user.
Here some information use on the graph implementation:
Build completed: QmXj9NxAqePuGADcC2XynbCedibwGrkwDBbnnG95E9wZUT Deployed to https://thegraph.com/studio/subgraph/saferyfirst/
Subgraph endpoints:
Queries (HTTP): https://api.studio.thegraph.com/query/4851/saferyfirst/v0.0.8
Query name: DisastersList Query:
{
disasterRegistereds(orderBy: disasterId, orderDirection: desc) {
disasterId
disaster_category
disaster_location
disaster_evidence
}
}
Donations are crucial to help support causes and make a positive impact on the world. However, it is sometimes painful to do a transaction each month to send money. We have created a system allowing users to give to charity on a monthly basis automatically. Now, a user just have to specify the cause he want to donate (Smart Contract address) and the amount of money he wants to give each month to the cause. He can then provide money to the smart contract in one transaction, and have the option of stopping his subscription latter on. This functionality allow him to abstract those transaction as it can be executed by other actors. Indeed, in our implementation, we decided to use Chainlink automation to trigger each month the smart contract function for transferring the fund from the smart contract to his support cause.
Smart Contract deployed: ./front/packages/hardhat/contracts/SubscriptionWallet.sol
Deployed Address Optimism:
https://optimistic.etherscan.io/address/0xdf310337db8d32555cc0042e4e7238a1319b94be
Chainlink Upkeep ID: 84420421238104438344157666514217813826547256944855569444703227161725687943734
Chainlink Upkeep address: 0x8B7D44941025FFfd53a054405B96A6b256efA329
More Information:
https://automation.chain.link/mumbai/84420421238104438344157666514217813826547256944855569444703227161725687943734
In some areas, the information is not shared as quickly as we would like. We proposed a real-time alerting system allowing people to share an event that is currently happening. Some natural disasters occurred without notice. This system allows people to communicate his position and to share what is currently happening.
We are using Waku to share the current position of the person and additional information as the type of event. Also, we were thinking about using this solution to share if some people needs assistances and those that are ready to offer help to the community.
In future version, we were also thinking about integrating a notification system through mobile phone as some area does not have internet connection.