forked from Uniswap/v2-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* alternative flash lending (renting) design * add rent interface * fix stack too deep error rearrange order of k condition math ignore erroneous out of gas errors in tests * try removing rent in favor of monolithic swap IUniswapV2Borrower -> IUniswapV2Callee update tests * fix implementation * clean up math a bit * amount{0,1}In -> amount{0,1}InNet * charge on all inputs, not just net * removed unnecessary safemath * add to != token check don't indent in scope rename reserve{0,1}Next -> reserve{0,1}Adjusted * > instead of >= simplify algebra reserve{0,1}Adjusted -> balance{0,1}Adjusted add comments * add some optimistic swap test cases
- Loading branch information
1 parent
3f5feaa
commit b742e92
Showing
5 changed files
with
94 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pragma solidity =0.5.16; | ||
|
||
interface IUniswapV2Callee { | ||
function uniswapV2Call(address sender, uint amount0, uint amount1, bytes calldata data) external; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters