Skip to content
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

feat: Flashloan support #3213

Open
1 of 9 tasks
MartinquaXD opened this issue Jan 7, 2025 · 0 comments
Open
1 of 9 tasks

feat: Flashloan support #3213

MartinquaXD opened this issue Jan 7, 2025 · 0 comments

Comments

@MartinquaXD
Copy link
Contributor

MartinquaXD commented Jan 7, 2025

Problem

We want to allow solvers and users to make use of flashloans for settling orders. For context a flashloan is a mechanism where an actor requests some amount of tokens, is allowed to use them within the same transaction and has to pay them back in full (sometimes plus interest) at the end of the transaction. If the flashloan lender does not get back the expected amount in tokens the whole transaction will revert and no balances will have changed.
This feature would enable solvers to handle liquidations for bigger amount than they can bankroll themselves.

The overall plan is to let users provide "hints" in their order appdata that it may need to be settled using a flashloan (and some details around that). The driver will read this information and let the solver know about it (flashloans introduce gas overhead that the solver should be aware for when computing fees) and will encode the transaction appropriately (using a helper contract that still needs to be developed).
Finally the post processing step where we index and analyze Settlement events needs to be made compatible with a smart contract calling the settle() function of the settlement contract.

Details to the individual steps can be found in the linked issues.
In order to ensure that tasks don't depend on each other let's introduce some interface which we code against. Those can then be used with Default implementations until we actually have the real data.

Implementation Plan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant