-
Notifications
You must be signed in to change notification settings - Fork 124
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
program: add liquidation via fill #1106
Conversation
makers_and_referrer_stats, | ||
slot, | ||
)?; | ||
// no referrer bonus for liquidations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
market_index, | ||
existing_direction, | ||
base_asset_amount, | ||
oracle_price, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible for this exhibit some auction behavior instead of deriving an order based on oracle_price
? Something like "if the user has been in liquidation for x slots, make the order more aggressive by y bps (or in price terms)"
Calculating the effective liq price on oracle_price + liquidator_fee
has the downside of favoring short liqs (buy to close) when oracle_price > drift_mark
and favoring long liqs when oracle_price < drift_mark
. Which is most problematic if all makers and the AMM are quoting wider (or AMM is unavailable) than oracle_price + liquidator_fee
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think this is a good follow up todo after merging this version
todos: