-
Notifications
You must be signed in to change notification settings - Fork 13
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
Create a simulation for vault liquidation #464
Comments
More specifically:
should work universally for all onboarder collaterals:
This functionality seems to already exist, so no additional steps seems to be required.
if we withdraw all possible dai, then i assume this is the correct approach BUT
yes, it is. let's avoid it as hard as possible 😓 |
Would Otherwise, I am not sure if you actually need to get tokens first. You might instead modify collateral balance in the VAT directly or write a script that opens a vault, then modifies its collateral size.
Not every token is swappable on Uniswap, as you see, we already have several groups of collaterals that require different exchange callees and it's most likely that this script is helpful when there is no callee yet. So, this option is the least favourable.
Not sure what you mean. Of course it will be beneficial to set collateral + debt amounts semi-random to be able to test different scenarios. |
Since I don't see the function that just edits the balance of the address at token contract of weth, I cannot say that it helps since impersonation of the token contract does not result into ability to edit some wallet's balance. Correct me if I'm on the wrong line of thinking.
True, but same with the adjustment of the vat balance. I will double check tomorrow but now I've seen no function that can be called to generate collateral out of thin air
Let's avoid, true.
Some swaps were failing back in the day when we converted DAI to mkr. That was because on the block number there apparently were no open trades that would allow swapping into desired amount |
Not the same, as there is only one VAT contract, right? If there is a single place, overwriting a mapping would be much more reliable than doing it for different token contracts. |
True, missed this point. Then let's roll with overwrite of this single value. Updated the proposal |
Goal
A developer is able to start a simulation which will create a vault and turn it into
liquidatable
state.Context
In order to test the new collateral types, but also vault logic, we need to create a reusable simulation steps in order to test related functionality. For this, let's implement a creation of a new vault and make this logic universal across collaterals. Eg:
createActiveVault(collateralType)
test logicliquidatable
by:drip
, iecollectProtocolFees(collateralType)
Note:
Tasks
The text was updated successfully, but these errors were encountered: