Risk Relay
An omnichain risk/hedge protocol leveraging cross-chain messaging and deploying across chains like Base, Mantle, Flare, Morph, and Linea for seamless data access and flexibility
Screenshots



Problem Statement
RiskRelay is an omnichain decentralized hedge and risk management protocol built on ERC-4626 standard vaults across EVM-compatible chains. This initiative aims to assess the feasibility of a cross-chain protocol that uses generalized message passing bridges like LayerZero, Hyperlane, and Chainlink's CCIP for message passing. The protocol taps into each chain's unique strengths: for example, Flare offers inbuilt Oracle solutions, Base provides liquidity, and Fhenix, Oasis and Inco has shielding capabilities - good for hiding bet amounts in prediction markets.
Solution
Decentralized Risk Hedge ProtocolThis project is a Solidity-based decentralized risk hedge protocol designed to combine the best features of multiple blockchain ecosystems. It leveragesChronicle,Flare's FTSO Contracts, andPYTHfor oracle data and usesHyperlaneandLayerZeroto enable seamless message passing across chains. Vaults holding hedge and risk assets are deployed on chains likeMorpho,Mantle,Linea, andBase, each selected for its unique strengths.Core ComponentsMarketCreatorTheMarketCreatorcontract creates and manages risk and hedge vaults for each market.Market Creation: ThecreateMarketVaults()function allows creating a pair of risk and hedge vaults for a market.Market Lookup: ThegetVaults()function retrieves the addresses of the vaults for a specific market.It maintains a mapping of market IDs to their corresponding vault addresses.RiskVault & HedgeVaultThese contracts represent the "risk" and "hedge" sides of a market, respectively.Deposit and Withdrawal: Users can deposit funds into the vaults and withdraw their shares later.Asset Transfer: Assets can only be transferred to the "sister" vault as controlled by theMarketCreator.Standardization: Both vaults are built on theERC4626standard for tokenized vaults.ControllerTheControllerretrieves data from oracles and determines whether to mature or liquidate the vaults based on market conditions.Experimentation with ConfigurationsWe explored various configurations to combine the best features of multiple chains:Single-Chain Deployment: In one setup, all contracts were deployed on a single chain, showcasing simplicity and direct oracle integration.Oracle Flexibility: Different oracles, such as Flare’s FTSO and PYTH, were used to assess compatibility and data quality.Cross-Chain Setup: The controller was deployed on one chain, such as Base, to access premium oracles like Chronicle. Vaults were placed on other chains like Mantle or Morph to leverage liquidity or privacy features.Leveraging the Best of Different WorldsBy experimenting with deployments across various chains, we aimed to create a system that combines:Robust Oracle Data: Accurate and reliable price feeds from Chronicle, PYTH, and Flare's FTSO.Liquidity Access: Deploying vaults on chains like Base ensures access to high liquidity.Privacy Features: Chains like Oasis offer confidentiality for sensitive data.This modular and flexible design demonstrates the potential of a decentralized risk management system capable of adapting to the strengths of different blockchain ecosystems. While there’s room for deeper analysis, the groundwork is set for a powerful, cross-chain solution.
Hackathon
ETHGlobal Bangkok
2024
Prizes
- 🏆
Chronicle Pool Prize
Chronicle Protocol
Contributors
- enderNakamoto
45 contributions