Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
|
||
| Once an order is placed within the CoW Protocol, it enters an auction batch. When a solution is found, the following steps occur: | ||
|
|
||
| 1. The winning solver calls the Flashloan Settlement Wrapper contract. |
There was a problem hiding this comment.
Would be nice to add a simulation of an example transaction here once we have that.
362b6b3 to
af2e2de
Compare
af2e2de to
a45dd74
Compare
fleupold
left a comment
There was a problem hiding this comment.
I would split the documentation between solvers and integrators (as they will care about different things).
One general advice in md files is to use one sentence per line. This makes it later easier to change parts without getting into annoying merge conflicts (if e.g. an entire paragraph is on the same line)
|
|
||
| 1. The winning solver calls the Flashloan Settlement Wrapper contract. | ||
| 2. The 2101 USDC gets transferred to the Flashloan Settlement Wrapper contract. | ||
| 3. In the pre-hook: |
There was a problem hiding this comment.
If we include all pre-hooks here I would add which ones are solver added and which ones are user defined. Note that one pre hook is one pre-interaction (and here we are listing multiple)
There was a problem hiding this comment.
But if this is a tutorial for users to use the flashloans, why would be relevant the solver's pre-interactions? 🤔
Co-authored-by: Felix Leupold <felixleupold90@gmail.com>
Co-authored-by: Felix Leupold <felixleupold90@gmail.com>
@fleupold thanks! 🙏 how would you split it, within the same section (one chapter for integrators and another for solver)? or to move the solver part to the section where the driver/solver is explained? |
squadgazzz
left a comment
There was a problem hiding this comment.
Will do another round or two later. Too much info to digest.
| sidebar_position: 6 | ||
| --- | ||
|
|
||
| # Repay debt with collateral using flash loans |
There was a problem hiding this comment.
Shouldn't the order type section be titled just 'Flash Loans,' with debt repayment described inside as the common use case? Or do we consider flash loans in CoW to be used only for this specific purpose?
There was a problem hiding this comment.
This file is to describe this particular use case. Ideally we will have more cases in the future.
| ### Flash loans | ||
|
|
||
| The user is able to create a flash loan order's hint by attaching to the `appData` the specified metadata. The autopilot reads the order and cuts it into a [batch auction](../../../concepts/introduction/batch-auctions). Then the driver fetches the `appData` by calling the orderbook with `GET /v1/app_data/<app_data_hash>` for every order and caches them in memory. The driver should include the flash loan information into the batch auction's order before sending it to the solver(s). | ||
|
|
There was a problem hiding this comment.
It would be nice to mention how flash loan orders impact the solution score, if at all. I assume they don’t, but it would be good to have a brief confirmation somewhere.
There was a problem hiding this comment.
hm I am not so sure. I believe it can alter the score if the solver is able to make a favorable deal. But I don't think flash loans are relevant to the score calculation per se.
| - **token:** the token that needs to get borrowed. | ||
| - **amount:** how many atoms of the token need to get borrowed (e.g., 1 `WETH` would be 10¹⁸). | ||
|
|
||
| If optional values were not provided the solver will choose sensible defaults. |
There was a problem hiding this comment.
IMO it would be helpful to expand the sensible defaults part a bit more.
There was a problem hiding this comment.
it is totally up to the solver.
Co-authored-by: ilya <squad.gazzz@gmail.com>
Co-authored-by: ilya <squad.gazzz@gmail.com>
Co-authored-by: Felix Leupold <felixleupold90@gmail.com>
|
Do we need to mention anywhere in the doc that currently only AAVE and Maker are supported? |
MartinquaXD
left a comment
There was a problem hiding this comment.
Looks like a reasonable first version of the docs. Although there are probably still a few improvements we can make in follow up PRs.
Co-authored-by: Martin Magnus <martin.beckmann@protonmail.com>
Co-authored-by: Martin Magnus <martin.beckmann@protonmail.com>
Co-authored-by: Martin Magnus <martin.beckmann@protonmail.com>
Description
It adds the flashloans documentation
Changes