Noah Zinsmeister 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
2020-02-07 10:40:27 -05:00
2020-02-17 15:06:43 -07:00
2020-02-17 15:06:43 -07:00
2019-10-22 11:38:01 -04:00
2019-11-22 18:24:14 -05:00
2019-12-30 15:21:02 -05:00
2019-10-22 11:38:01 -04:00
2020-01-27 10:59:18 -05:00
2019-10-22 11:38:01 -04:00
2020-01-22 11:47:24 -05:00
2020-01-22 11:47:24 -05:00
2019-10-22 11:38:01 -04:00
2020-01-22 11:47:24 -05:00

The contents of this GitHub repo are confidential until this disclaimer is removed and the repo is made public

UniswapV2

Actions Status

Local Development

The following assumes the use of node@>=10.

Clone Repository

git clone https://github.com/Uniswap/uniswap-v2-core.git
cd uniswap-v2-core

Install Dependencies

yarn

Compile Contracts and Run Tests

yarn compile
yarn test
Description
No description provided
Readme 1,019 KiB
Languages
Solidity 53.7%
TypeScript 46.3%