Skip to main content

Shadow Protector

Pushing DeFi Towards Interoperability

AIBase Batch India

About this project

The problem it solves

Description

Condition Orders are DeFi Operations created by Users based on Different On-chain parameters on Protocols such as Chainlink, Aave, Morpho which on becoming true would be executed by Solvers in the near future to move funds across chains, Lending protocols, swaps and more.

Current Landscape

We live in Multi-chain ecosystem whereby we carry out different sorts of financial transactions as per the protocol incentives, yield farming, arbitrages and so on. Each protocol follows it's own novel approach for yield generation and has developed it's own parameters for protocol stability in such a high volatile market. It's very difficult to have an understanding and keep track of these parameters to save guard one from catastrophic scenarios such as Liquidations.

One of the areas of major concern are that all the lending protocols rely on price feeds on platforms such as Chainlink, Pyth network but the limit orders offered in the DeFi space are mostly based on Pool's internal pricing mechanism which is generally have a significant delay.

I have developed a prototype which offers DeFi Actions on parameters from Price Feeds such as Chainlink, Live Data from Lending Protocols to execute operations which would safe guard users from liquidation.

Real World Scenario

Let's Assume:

I have a borrow position at Aave by depositing collateral such as (ETH, BTC, cbETH) and borrowed some USDC to do yield farming and obtain a high yield to offet by borrowing interest rate.

Tragic Event: (Sudden Price Drop)

The Price of these volatile assets experiences a sudden drop. As Aave, relies on platform such as Chainlink to get the data. My Loan-To-Value ratio of the position starts dropping down and reaches the point of liquidation.

Traditionally:

Most likely, I would have to face liquidation as lose more money than I would earned.

My Product:

If I had created a limit order based on my Loan-To-Value ration and deposited my Yield Farming (interest bearing tokens) as a deposit (Assuming Morpho Vault). The tokens would have been withdrawn from Morpho to obtain USDC and would have supplied or repaid based on the Limit Order Parameters.

Protocols Integrated

  • Aave (Base and Arbitrum )
  • Aerodrome (Base)
  • Chainlink (Base and Arbitrum)
  • Morpho (Base)
  • Hyperlane (Base and Arbitrum)
  • Circle CCTPV2 Hooks (Base and Arbitrum)

Smart Contract Addresses

Base

Factory: 0xEc9A1021cC0d4619ac6405a648239bEB0bFCf76C Vault Deployer: 0xbF7d635B1F6fed745d9414a414F1f8B372C0bd79 Vault : 0x2554823F28f819a6D75081Ec65f7Be1798447eBD

Arbitrum

Factory: 0xdE8bb0fbcA6deE981c607C54f94bdd34A9D15362 Vault Deployer: 0xEc9A1021cC0d4619ac6405a648239bEB0bFCf76C Vault: 0x20c3d47D0551fcF44F906Cb04aEBB90ef4AA0BCA

Challenges we ran into

  • Identifying the parameters which would benefit the user for creating limit orders.

  • Configuration of Handler smart contract for interaction with each lending protocol such as Aave, Morpho Markets, Morpho Vaults and Euler required deep understanding of concepts and simulating various scenarios.

  • Since, there are multiple parameters required to be configured for creating an limit order, Visualizing the flow of steps was quite challenging.

About the founder

Building on Base from India

Technologies and tags

JavaScriptTailwind CSSReactSolidityChainlinkAAVEDefiNext.jsGraphQL