
DairyNinja
programmatic cowswap orders with additional quote and price sanity checks
Demo
About
perform a swap through cowswap using programmatic orders from a safe module, but only if the quote cowswap gives through their api is better than 1inch. this prevents executing swaps on cow for which a higher price is guaranteed by 1inch. additional sanity checks on the price are also performed via oracle price comparisons.
How it's made
- compare cowswap and 1inch swap quotes on a web2 api - using api3 to call api endpoint to retrieve best quote - only in case cowswap is best quote, use cow programmatic order to make swap - perform additional sanity checks on the quote using a chronicle oracle: is the api quote realistic?