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
it("Should provide a caller with more DAI than they started with after a swap",asyncfunction(){
Hello and thank you very much for putting this together.
I hope this is an okay place to ask but I wanted to just clarify one thing about this test because I think I have misunderstood something.
Though this doesn't exist in the test I added a line to check the DAI balance of the simpleSwap contract before executing the swapWETHForDAI function. I also checked the SwapRouterAddress which also has 0 DAI.
When I logged that I saw that the simpleSwap has a DAI balance of 0.
I am just unclear on how this function can execute correctly if the DEX has 0 DAI balance, does the DEX not need to have liquidity of DAI in order for the receiver to be paid out in DAI when the receiver has swapped in his WETH?
How is the simpleSwap able to fund the sender with DAI if it has none?
Hope to get some clarification on this.
Thanks very much!
The text was updated successfully, but these errors were encountered:
uniswap-first-contract-example/test/SimpleSwap.test.js
Line 19 in 696c8e1
Hello and thank you very much for putting this together.
I hope this is an okay place to ask but I wanted to just clarify one thing about this test because I think I have misunderstood something.
Though this doesn't exist in the test I added a line to check the DAI balance of the simpleSwap contract before executing the swapWETHForDAI function. I also checked the SwapRouterAddress which also has 0 DAI.
When I logged that I saw that the simpleSwap has a DAI balance of 0.
I am just unclear on how this function can execute correctly if the DEX has 0 DAI balance, does the DEX not need to have liquidity of DAI in order for the receiver to be paid out in DAI when the receiver has swapped in his WETH?
How is the simpleSwap able to fund the sender with DAI if it has none?
Hope to get some clarification on this.
Thanks very much!
The text was updated successfully, but these errors were encountered: