osmosis-labs / isotonic

Smart Contracts for the Lendex Protocol
MIT License
1 stars 0 forks source link

Liquidate via AMM #68

Closed ethanfrey closed 2 years ago

ethanfrey commented 2 years ago

Currently the person liquidating will need to have capital.

This would allow a liquidator to simply inform the contract that a position is under collateralised and the credit agency will sell off collateral on the proper AMM to cover the debt.

This is quite cool, but brings in a lot of risk of front running, incentives, and the Credit Agency knowing the proper sale price.

If Osmosis adds "flash loans", this would be equivalent to:

Yielding the caller the profit delta. I'm not sure which would be feasible first. (Flash loan advantage is an active participant who will adapt to avoid being front-run)

uint commented 2 years ago

This is blocked by #83!

ks-victor commented 2 years ago

See note above. We will do liquidation via the AMM

ethanfrey commented 2 years ago

How is this done if the issue blocking it is still not completed?

It sounds like you did decide to go this approach

uint commented 2 years ago

How is this done if the issue blocking it is still not completed?

Kain created an issue (board note?) for this when we were planning. Later we realized there's a duplicate, had to close one. It's not done.

It sounds like you did decide to go this approach

Yep.

ethanfrey commented 2 years ago

If you close due to duplicate, then please say "Closed as it was a duplicate of #XYZ" and include a reference to the other one.

And ensure the other one has a better description than this one.

uint commented 2 years ago

If you close due to duplicate, then please say "Closed as it was a duplicate of #XYZ" and include a reference to the other one.

And ensure the other one has a better description than this one.

Aaaand done. #92 is the proper ticket. Open to feedback!