You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to get the most learning value of this exercise and have tried different options:
-In systematic 2 steps full liquidation (liquidating 1568 ETH), I get profit of 24.11 ETH https://github.com/DrShymaa2022/defi-mooc-lab2
-If I compared this to 1 step profit as 21...ETH, it seems reasonable and satisfiable to increase it by about 1/7 = 14%
-However, if we looked at the details of the results 2 annoying observations:
1-How come a gain of 142 ETH ends to be only 24.1?
2-How come what a lot of people did of liquidating less than ≤1000 leads to more than double the profit (43.8 ETH, for difference gain ranging from 86 to 94 if we applied 2 steps https://github.com/Shymaa-Arafat/defi-mooc-lab2/blob/a00d99b0dd63c1da3cf32d9b918f63b8bfcd72c0/contracts/LiquidationOperator.sol)?
.
-If the flash swap charges ratio "rt" for the Flashloan, ie for loan X we payback (1+rt)X { rt<1 in fact should be 0.003?}
If X1>> X2
X1 leads to 142 ETH
X2 leads to 86 ETH
Profit Pr= gain from liquidation - ratioX
for Pr1 < Pr2 ( what happened in the runs)
rt*(X1-X2)> gain difference
in our case
rt1.5m$ >142-86 ETH
rt> 561.8/1500
rt> 0.0672
no way uniswap charges more than 6.7%????
If we added more exact values ( difference is nearly 20 ETH)
It should be rt = 76*1.8/1500 = 9.1%
.
If this is not the case as I think, please take the time to find out what is the common mistake most of us had fallen in and was not discovered by the test script
( I tried running other people codes and changing parameters or printing details to check it out) and was not discovered by the test script
.
-Finally, would be helpful for the next course version if the read me guide shed some light on using uniswap router or regular call to payback and pros & cons of both ( people in discord mentioned re-entrancy attack)
.
Thanks
The text was updated successfully, but these errors were encountered:
I'm trying to get the most learning value of this exercise and have tried different options:
-In systematic 2 steps full liquidation (liquidating 1568 ETH), I get profit of 24.11 ETH
https://github.com/DrShymaa2022/defi-mooc-lab2
-If I compared this to 1 step profit as 21...ETH, it seems reasonable and satisfiable to increase it by about 1/7 = 14%
-However, if we looked at the details of the results 2 annoying observations:
1-How come a gain of 142 ETH ends to be only 24.1?
2-How come what a lot of people did of liquidating less than ≤1000 leads to more than double the profit (43.8 ETH, for difference gain ranging from 86 to 94 if we applied 2 steps
https://github.com/Shymaa-Arafat/defi-mooc-lab2/blob/a00d99b0dd63c1da3cf32d9b918f63b8bfcd72c0/contracts/LiquidationOperator.sol)?
.
-If the flash swap charges ratio "rt" for the Flashloan, ie for loan X we payback (1+rt)X { rt<1 in fact should be 0.003?}
If X1>> X2
X1 leads to 142 ETH
X2 leads to 86 ETH
Profit Pr= gain from liquidation - ratioX
for Pr1 < Pr2 ( what happened in the runs)
rt*(X1-X2)> gain difference
in our case
rt1.5m$ >142-86 ETH
rt> 561.8/1500
rt> 0.0672
no way uniswap charges more than 6.7%????
If we added more exact values ( difference is nearly 20 ETH)
It should be rt = 76*1.8/1500 = 9.1%
.
If this is not the case as I think, please take the time to find out what is the common mistake most of us had fallen in and was not discovered by the test script
( I tried running other people codes and changing parameters or printing details to check it out) and was not discovered by the test script
.
-Finally, would be helpful for the next course version if the read me guide shed some light on using uniswap router or regular call to payback and pros & cons of both ( people in discord mentioned re-entrancy attack)
.
Thanks
The text was updated successfully, but these errors were encountered: