branch mathc-v1
utilize vyper 0.2.12
If pip can't find 0.2.12, just git clone then python setup.py install
locally.
Env:
mac
python3.6
Because:
Old toolchain not compile, 1.x vyper has lots of bugs, missing types when run..
My mac won't install old version 0.1.x vyper...
There is not easy sandbox to test contract in python DSL (vyper...)
I can practice rewriting ERC20, Uniswap a bit like I did here !
In whitepaper,
"Uniswap can be frontrun to some extent. This is bounded by user set minimum/maximum values and transaction deadlines"
read pdf in root dir
VB original idea with my comments.
whitepaper has more examples
reading best sol practice
formal-verification proof, math
- Website: uniswap.io/
- Docs: docs.uniswap.io/
- Twitter: @UniswapExchange
- Reddit: /r/Uniswap/
- Email: [email protected]
- Slack: uni-swap.slack.com/
- Whitepaper: Link
Requires Python 3
- Clone Uniswap
$ git clone https://github.com/Uniswap/contracts-vyper
$ cd contracts-vyper
- Setup virtual environment
$ pip3 install virtualenv
$ virtualenv -p python3 env
$ source env/bin/activate
- Install dependencies
pip install -r requirements.txt
- (Optional) Switch Vyper compiler to version used in Uniswap verification
cd vyper
git reset --hard 35038d20bd9946a35261c4c4fbcb27fe61e65f78
cd ..
- Run tests
$ pytest -v tests/