-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for oracle orders to liquidator bots #93
Comments
We can add Liquidator already calculates a worst-case price against infinite slippage: keeper-bots-v2/src/bots/liquidator.ts Lines 616 to 626 in 1549a72
When closing out via oracle order, that would be Perhaps |
I think we could probably change IF the liquidator is configured for market orders:
If liquidate is configured for market oracle order:
We already have the deriveOracleAuctionParams (https://github.com/drift-labs/protocol-v2/blob/3d9105fa85fe90cebd3cc2178a3fc55d52aedbba/sdk/src/math/auction.ts#L117) to get the market oracle params from the market order params |
#119 is a quick fix for this issue, might be a good PR to refer to (since it touches the relevant areas of code) if someone wants to take a stab at this and make liquidator derisk smarter |
Have liquidators close out their position using oracle orders
Example of placing oracle order here: https://drift-labs.github.io/v2-teacher/#placing-oracle-market-orders
The text was updated successfully, but these errors were encountered: