Commit Graph

14 Commits

Author SHA1 Message Date
b742e92502 optimistic swaps (#53)
* 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
2020-02-17 15:06:43 -07:00
1a4837bffa reorder ERC20 functions, clean up naming 2020-01-22 13:14:55 -05:00
ea5e63c427 improve code quality of tests 2020-01-22 12:16:55 -05:00
cbe801b54f remove forfeit{,from}
make name + symbol + decimals constant

add GenericERC20

rename some contracts

update tests to reflect all of this
2020-01-13 15:59:07 -05:00
9f15d75925 fix tests related to bytecode 2020-01-08 13:04:01 -05:00
a589b65bd5 remove unused dependency 2020-01-06 12:39:35 -05:00
e9e087c328 remove getTokens from the factory 2019-12-30 13:30:15 -05:00
c9d0ba6198 prefix burn/burnFrom in ERC20 with unsafe
fix tests for new contract code
2019-12-18 17:51:25 -05:00
f263dab9b5 add more tests 2019-12-13 14:39:09 -05:00
4c77c630fb bulk out fee implementation 2019-12-12 18:12:23 -05:00
7f7169fec4 fix tests 2019-11-21 13:26:57 -05:00
43dfc8c567 add exchanges data structure
fix tests
2019-11-19 18:17:11 -05:00
88b63ccee0 add getOtherTokens
rework function order

test tweaks
2019-10-31 12:43:51 -04:00
976ac977e9 testing improvements
added fixtures, utilities, constants

modularized and cleaned up code
2019-10-30 13:27:10 -04:00