Commit Graph

11 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
55ae25109b MINIMUM_TOTAL_SUPPLY -> MINIMUM_LIQUIDITY (#51)
* MINIMUM_TOTAL_SUPPLY -> MINIMUM_LIQUIDITY

make selector private
2020-02-07 10:38:46 -05:00
a1e31c29a6 THRESHOLD -> MINIMUM_TOTAL_SUPPLY 2020-02-03 11:08:22 -05:00
1a2d91c440 view -> pure for the appropriate functions 2020-01-30 15:45:23 -05:00
ff7bee4252 add IUniswapV2ERC20 methods to IUniswapV2Exchange 2020-01-30 14:08:15 -05:00
bab77458b2 whitespace + comment cleanup 2020-01-30 12:49:09 -05:00
80ce1e48c0 move from invariant -> k (compute sqrt lazily)
use getReserves more places

improve comment quality
2020-01-29 13:15:07 -05:00
a55aa4bfed block.number -> block.timestamp
tweak timing tests

make tests even better
2020-01-23 12:30:39 -05:00
85d6435ea2 add some comments
preface all errors with "UniswapV2: ..."

tweak the order of a few things

use abi.encodeWithSelector instead of abi.encodeWithSignature
2020-01-22 15:39:43 -05:00
b972227df8 update to solc@0.5.16
update waffle version and fix deprecations

move CI from circle to github actions
2020-01-22 11:47:24 -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