Liquidation bots are critical to ensure the soundness of the protocol. Given the highly competitive environment, there usually isn’t any incentive to publicly share methodologies or much less open source code for liquidation bots. We want to change that.
We have a couple of ideas for you to build upon:
Profit calculation to determine if it’s worth executing based on gas fees
Swap collateral penalty reward back to ETH for gas so it can run forever
Multi-chain support (e.g. Arbitrum, Optimism, Scroll…)
We also have open source bot frameworks for you to build upon:
Data analytics are critical to understanding the functioning of the system. We currently have two external analytics dashboards:
There’s areas where we’d love to have more granularity and have it open for all to better understand Spark.
How many are there? Are there any new ones?
Where are they coming from? What other protocols are they in?
What is the breakdown/distribution?
Is it possible to categorise them?
How many users supply without borrowing? How many users
How many users use an automation tool? (DefiSaver, Instadapp)
Where do users come from? Competing money market platforms, CEXs, new to the space?
Build a google app script that wraps standard RPC calls so Google Sheet users can retrieve on-chain data without anything else apart from gSheet functions (and an RPC provider).
Feel free to use any stack that you prefer, we have a couple of ideas of what’s most interesting nowadays:
Dune Analytics’ Spellbook
Position Manager / High Level Actions
Automation & Account Abstraction
Build an automated position manager that takes care of the user position.
One way of going about it is using a Safe and ComposableCoW to create leverage long/short position.
Then using a stop loss order to set a custom liquidation price aiming to gracefully liquidate while avoiding the default protocol liquidation.
Then buying back the position (soft liquidations anyone?)
Build high level actions, abstracting away the complexities and multiple steps!
1-click (recursive) Leverage
Alerts are the first step towards automation, manually monitoring your position or changes in parameters is not a fun way to spend your time. Build an alerting system that notifies users about the state changes of their positions or other important metrics.
State change alerts (e.g. Loan to Value (LTV) ratio, Health Factor (HF), value of your collateral(s), value of one of your collaterals)
Change in parameters (e.g. risk parameters for collaterals, the supply and/or borrow rate of a specific collateral)
Allow users to define the alert (level, time-based vs event-based)
Allow users to define how they receive the alert (e.g. telegram, discord, email, XMTP)