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



Problem Statement
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 v3Euler
Solution
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/HookTo fetch the current price data → Pyth OracleTo 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)
Hackathon
ETHGlobal Bangkok
2024
Prizes
- 🏆
Blockscout Explorer Big Pool Prize
Blockscout
- 🏆
Euler Telegram Integration2nd place
Euler
- 🏆
Build Data - driven dApps with Brevis ZK Coprocessor2nd place
Brevis
- 🏆
Most Innovative use of Pyth pull oracle (Price Feeds)2nd place
Pyth Network
- 🏆
Open Innovation – $2000
CoW DAO
Contributors
- junta
13 contributions
- optimus789
5 contributions