To setup this protocol, you mainly have to deploy 2 smart contracts:
-
CatastropheBondsCollateralPool
: That acts as a pool containing and managing the collateral for the created Catastrophe Bonds and their respective posiions. -
CatastropheBondsFactory
: That acts as a factory for deployment/creation of Catastrophe Bonds with different specifications.
And, in order to serve its functionality cross-chain, you need to deploy these contracts to Avalanche Fuji (having ETH-ChainId as 43113
) and Polygon Amoy (having ETH-ChainId as 80002
) networks.
On Avalanche Fuji:
npx hardhat deployCollateralPool --network avalancheFujiTestnet
npx hardhat verify ${CatastropheBondsCollateralPool_Address} --network avalancheFujiTestnet
On Polygon Amoy:
npx hardhat deployCollateralPool --network polygonAmoy
npx hardhat verify ${CatastropheBondsCollateralPool_Address} --network polygonAmoy
On Avalanche Fuji:
npx hardhat deployFactory ${CatastropheBondsCollateralPool_Address} --network avalancheFujiTestnet
npx hardhat verify ${CatastropheBondsFactory_Address} ${CatastropheBondsCollateralPool_Address} --network avalancheFujiTestnet
On Polygon Amoy:
npx hardhat deployFactory ${CatastropheBondsCollateralPool_Address} --network polygonAmoy
npx hardhat verify ${CatastropheBondsFactory_Address} ${CatastropheBondsCollateralPool_Address} --network polygonAmoy
You can open and interact with this protocol in Remix IDE:
You can also use the minimal dApp to interact with the Catastrophe Bonds Protocol.
The dApp is using the following deployed and verified CatastropheBondsCollateralPool
and CatastropheBondsFactory
contracts:
On Avalanche Fuji:
- CatastropheBondsCollateralPool
- CatastropheBondsFactory
On Polygon Amoy:
- CatastropheBondsCollateralPool
- CatastropheBondsFactory
And, the corresponding CatastropheBondsFactory
contract has been registered as Custom Logic Upkeep at automation.chain.link and added as consumer to the respective subscriptions at functions.chain.link on both the networks, so as to utilise the automated request sending to the oracle and contract settlement based on the value received from the oracle.
Also, the CatastropheBondsFactory
contract is utilising CCIP to create the Catastrophe Bonds across chains i.e., if one Catastrophe Bond contract is being created and deployed on Avalanche Fuji, then a copy of the same will be created and deployed on Polygon Amoy and vice versa, and the same can be explored on ccip.chain.link using the corresponding message id or transaction hash.
And, similarly the CatastropheBondsCollateralPool
contract is utilising CCIP for cross-chain minting and redeeming of position tokens for Catastrophe Bonds, as well as for moving USDC Collateral back and forth across chains depending on the requirement in terms of the favour of settlement.
Part-1 | Showcasing the "WILD FIRE" being detected in "Tshuapa, Democratic Republic of the Congo":
Part-2 | Showcasing the "WILD FIRE" not being detected in "Marsabit, Kenya":
Part-3 | Showcasing the "HEATWAVE" being detected in "Delhi, India":