project screenshot 1
project screenshot 2
project screenshot 3

CollaSwitch

Execute collateral/debt swap for lending protocol automatically when a certain condition is met, powered by CowSwap Programmatic Order.

CollaSwitch

Created At

ETHGlobal Bangkok

Winner of

Blockscout - Blockscout Explorer Big Pool Prize

Prize Pool

Euler - Euler Telegram Integration 2nd place

Brevis - Build Data-driven dApps with Brevis ZK Coprocessor 2nd place

Pyth Network - Most Innovative use of Pyth pull oracle (Price Feeds) 2nd place

CoW DAO - Open Innovation – $2000

Project Description

Condition to trigger collateral Swap:

  • Price change(e.g. DAI price is less than 0.99)
  • Interest Rate change of the pool(Daily Interest change is more than 1%)

Once order is picked up by solver and executed, show a link to blockscout explorer on console.

Then execute switch collateral from token A to token B on the following supported lending protocol:

  • Aave v3
  • Euler

How it's Made

To call order automatically → Cow Programmatic order. Their solvers keep calling the getTradeableOrder function, which trigger condition is defined periodically.

To execute collateral swap: CowSwap order + Pre/Hook

To fetch the current price data → Pyth Oracle

To import daily interest change of the lending pool → Brevis(Fetch interest rate data from tx event and calculate interest rate difference on their zk coprocessor, then update value in smart contract)

background image mobile

Join the mailing list

Get the latest news and updates