Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
2a528cd
Add files via upload
AngelaKTE Jan 7, 2021
38230c0
Delete BalancerAMM-v012.ipynb
AngelaKTE Jan 12, 2021
1246023
Delete BalancerAMM-v01.ipynb
AngelaKTE Jan 12, 2021
2860f36
Add files via upload
AngelaKTE Jan 12, 2021
e6fde5b
ignore data
Ramarti Jan 13, 2021
55f0a4a
script to parse csv exports from etherscan into actions
Ramarti Jan 14, 2021
8f12e8d
Merge branch 'data' into dev
Ramarti Jan 14, 2021
f39d057
classify as actions easier to plug
Ramarti Jan 14, 2021
c3f042f
changed output to array
Ramarti Jan 15, 2021
5a86aa1
WIP
Ramarti Jan 15, 2021
495a171
WIP: inital model
Ramarti Jan 15, 2021
f9674b5
classified join_swap and exit_swaps
Ramarti Jan 16, 2021
1b37c47
float values
Ramarti Jan 16, 2021
b8a81d5
inital simulation set up with swaps
Ramarti Jan 17, 2021
86c69c9
Closes #18
Ramarti Jan 18, 2021
9da1fc3
postprocessing dataframe for pools
Ramarti Jan 20, 2021
96f6108
postprocessing dataframe for pools
Ramarti Jan 20, 2021
4bb63bc
added postprocessing to notebook
Ramarti Jan 20, 2021
0da2176
pool_state_updates: introduce s_join_pool()
randomshinichi Jan 20, 2021
b49bdf8
new state update function: s_join_swap_extern_amount_in()
randomshinichi Jan 20, 2021
4eaa169
s_join_pool(): use calculated amount instead of expected amount from …
randomshinichi Jan 20, 2021
2c6642e
s_join_swap_extern_amount_in(): only count bound tokens when calculat…
randomshinichi Jan 21, 2021
f647a3d
s_exit_swap_extern_amount_out() implemented
randomshinichi Jan 21, 2021
58753da
cadCAD params provides swap_fee
randomshinichi Jan 21, 2021
b41a1dd
make state update function switching a dict
randomshinichi Jan 21, 2021
88b3d90
WIP: timestep action selector on policies, stuck on unit test
Ramarti Jan 22, 2021
6026428
Merge pull request #26 from TokenEngineeringCommunity/andrew
Ramarti Jan 22, 2021
1baee14
WIP
Ramarti Jan 22, 2021
ee91b05
Merge branch 'feat/25-timesteps' into dev
Ramarti Jan 22, 2021
919b7ca
price feed and state update
Ramarti Jan 23, 2021
b86fb5f
Merge branch 'feat/parse_price_feeds' into dev
Ramarti Jan 23, 2021
6622307
WIP: timesteps and external feeds working toguether, too slow
Ramarti Jan 23, 2021
131dd18
WIP: notebook
Ramarti Jan 23, 2021
57b0e10
back to one timestep per action, with datetime
Ramarti Jan 25, 2021
3e24931
Moved calculation logic to policies from system update functions
randomshinichi Jan 26, 2021
d0435fc
removed stale import
randomshinichi Jan 26, 2021
a53a2b3
Merge pull request #35 from TokenEngineeringCommunity/andrew
Ramarti Jan 26, 2021
1c6010c
WIP
Ramarti Jan 26, 2021
d0b874a
First plots/layout added
AngelaKTE Jan 26, 2021
7281b1b
Update BalancerAMM-v013.ipynb
AngelaKTE Jan 26, 2021
5586f4f
TVL Plot
AngelaKTE Jan 26, 2021
8e70b4d
script to add price feeds, policy and state updates , post processing
Ramarti Jan 27, 2021
6f9a96b
script to add price feeds, policy and state updates , post processing
Ramarti Jan 27, 2021
447b37f
cleared output
Ramarti Jan 27, 2021
3f74b97
cleared output
Ramarti Jan 27, 2021
6ff7344
Merge branch 'viz' into dev
Ramarti Jan 27, 2021
059646c
TVL chart updates
AngelaKTE Jan 27, 2021
378bd11
json in notebook
Ramarti Jan 27, 2021
e92b4a9
output cleared
AngelaKTE Jan 27, 2021
7979201
XMerge branch 'viz' of github.com:TokenEngineeringCommunity/BalancerM…
Ramarti Jan 27, 2021
f790f3b
Merge pull request #39 from TokenEngineeringCommunity/viz
Ramarti Jan 27, 2021
68c6e6d
Cleaned .ipynb
AngelaKTE Jan 27, 2021
7fc1b88
added prints to add_external_price_feeds
Ramarti Jan 28, 2021
832370d
Merge branch 'dev' of github.com:TokenEngineeringCommunity/BalancerMo…
Ramarti Jan 28, 2021
9b1117b
added action type
Ramarti Jan 28, 2021
092cfd5
added action type
Ramarti Jan 28, 2021
f140f5b
changes
Ramarti Jan 28, 2021
2d0d487
Merge branch 'viz' of github.com:TokenEngineeringCommunity/BalancerMo…
Ramarti Jan 28, 2021
400a683
Merge branch 'viz' into dev
Ramarti Jan 28, 2021
e3c3cbe
update text reg. system_policies.py
AngelaKTE Jan 28, 2021
25d41bb
Merge branch 'dev' into viz
AngelaKTE Jan 28, 2021
35d060d
updated text system_policies.py
AngelaKTE Jan 28, 2021
b7276c3
Merge pull request #41 from TokenEngineeringCommunity/viz
Ramarti Jan 28, 2021
9b4c324
fix notebook
Ramarti Jan 28, 2021
3fe0507
revised drop first row code - no more special cases
randomshinichi Jan 26, 2021
aaa4e2b
unittests for policy functions swap, join, join_swap, exit_swap
randomshinichi Jan 27, 2021
33cd165
refactor values to price
Ramarti Jan 29, 2021
fce50ad
spot prices and swap_fee as pool parameter
Ramarti Jan 29, 2021
204113d
cleared notebook output
Ramarti Jan 29, 2021
40aefc1
Merge branch 'dev' into andrew
Ramarti Jan 29, 2021
ab06fdd
Merge pull request #42 from TokenEngineeringCommunity/andrew
Ramarti Jan 29, 2021
91a1a27
script to get a receipt and parse anonymous events
Ramarti Feb 1, 2021
07c2948
ERC20 token symbol getter
Ramarti Feb 1, 2021
f65076b
requirements
Ramarti Feb 1, 2021
6e33308
Initial bigquery data pulling script
randomshinichi Feb 2, 2021
57e2a9a
Merge branch 'dev' of github.com:TokenEngineeringCommunity/BalancerMo…
Ramarti Feb 2, 2021
0184a5d
cleaned up requirements.txt
randomshinichi Feb 3, 2021
54e85d2
renamed to pulldata.py
randomshinichi Feb 3, 2021
66ec557
Merge pull request #47 from TokenEngineeringCommunity/andrew
Ramarti Feb 3, 2021
5b0b70c
pulls more data, tells Bigquery to sort it for us, introduces query_s…
randomshinichi Feb 3, 2021
722a128
moved things into produce_actions() so Raul can have his own section
randomshinichi Feb 4, 2021
3b97a02
Merge branch 'dev' into produce_initial_states
Ramarti Feb 4, 2021
df9366f
WIP: import troubles
Ramarti Feb 4, 2021
07e3a0e
script to get a receipt and parse anonymous events
Ramarti Feb 1, 2021
1004975
ERC20 token symbol getter
Ramarti Feb 1, 2021
db3a9bc
requirements
Ramarti Feb 1, 2021
726f853
outputs an actions.json. Also, profiling and optimizations, and suppo…
randomshinichi Feb 5, 2021
f8081fd
support for switching between pickles and json from command line
randomshinichi Feb 5, 2021
b3a623e
print 40 lines of profiling stats
randomshinichi Feb 5, 2021
5125fd4
optimized fee lookup, shaved 7 seconds
randomshinichi Feb 5, 2021
61c55d1
Merge branch 'andrew' into produce_initial_states
randomshinichi Feb 5, 2021
3591263
Merge pull request #50 from TokenEngineeringCommunity/produce_initial…
randomshinichi Feb 5, 2021
6051c4d
fix w3_utils import
randomshinichi Feb 5, 2021
86c5658
reduce actions to essentials, group with method calls
Ramarti Feb 6, 2021
1e0c66e
WIP
Ramarti Feb 8, 2021
e7ee7b9
fixed save_queries_pickle() not actually working
randomshinichi Feb 8, 2021
0eee355
TransactionReceiptGetter now uses pickles because there are bytes in …
randomshinichi Feb 8, 2021
cc94485
use Web3.fromWei() ether conversion
randomshinichi Feb 8, 2021
fad0340
produce_initial_state: format conversions are different when coming f…
randomshinichi Feb 8, 2021
4b2ecdd
fixed format_denorms(); ensured that dataframes from pickles always u…
randomshinichi Feb 8, 2021
c3a003b
the contract symbol is never bytes
randomshinichi Feb 8, 2021
cf42104
do not save SQL query results anymore in json - timestamps appear as …
randomshinichi Feb 8, 2021
7c391d6
Merge pull request #51 from TokenEngineeringCommunity/andrew
Ramarti Feb 9, 2021
763a7cb
fixes in event parsing, hardcoding mkr
Ramarti Feb 10, 2021
25bdeaf
added BPool ABI to repo
Ramarti Feb 10, 2021
8836c1d
added WETH DAI pool
Ramarti Feb 10, 2021
9816c0a
deleted pickles for 0x8b6e6
randomshinichi Feb 10, 2021
f49cd08
renamed BPool.json to v1-abi.json
randomshinichi Feb 10, 2021
27245d6
w3_utils: fix amount not being coerced; some default token mappings
randomshinichi Feb 10, 2021
da0ff7b
Dynamic generate_initial_state(), will load data from *-initial_pool_…
randomshinichi Feb 10, 2021
866736a
MKR check is already in dict and doesn't need an if branch
randomshinichi Feb 10, 2021
3104a66
Merge pull request #56 from TokenEngineeringCommunity/andrew
Ramarti Feb 10, 2021
3c15a80
forgot to add generated spot_prices to initial_values
randomshinichi Feb 11, 2021
a19b54c
Move away from strings in state variables; it wasn't working, and the…
randomshinichi Feb 11, 2021
045ceba
post_processing(): cast balances to Decimal
randomshinichi Feb 11, 2021
44309a8
Token class ensures that balance is always a Decimal
randomshinichi Feb 11, 2021
f36f5b6
Token class now forces balance to be Decimal throughout the policies …
randomshinichi Feb 11, 2021
3e62eca
merging prices
Ramarti Feb 12, 2021
c3e0326
Merge branch 'andrew' into dev
Ramarti Feb 12, 2021
8b380a9
restructured action json
Ramarti Feb 12, 2021
5d03fa5
update README
Ramarti Feb 12, 2021
a322bd4
jsons
Ramarti Feb 12, 2021
f532f4e
pulldata.py: backup tx receipts received from web3py, and try to use …
randomshinichi Feb 12, 2021
ec8adca
remove first prices before pool_creation
Ramarti Feb 12, 2021
a655d2a
Merge branch 'andrew' into dev
Ramarti Feb 12, 2021
701dcfc
WETH DAI prices
Ramarti Feb 12, 2021
0ab4a7d
NB update
AngelaKTE Feb 14, 2021
16c89f4
Merge pull request #57 from TokenEngineeringCommunity/NBupdate
Ramarti Feb 15, 2021
6582cfa
add initial prices to pool states too
Ramarti Feb 15, 2021
f5709fb
modified Balancer V1
Ramarti Feb 15, 2021
f99a570
included json with prices in NB, started refactoring action decoder
Ramarti Feb 15, 2021
48aea51
refactor action decoder for new input, add multitoken exit
Ramarti Feb 15, 2021
a56094d
remove nan prices
Ramarti Feb 15, 2021
64e9f5a
fix token spot prices
Ramarti Feb 15, 2021
47f7190
fix spot prices and update notebook
Ramarti Feb 15, 2021
aa3f90d
moved turn_events_into_actions() out of produce_actions()
randomshinichi Feb 15, 2021
b1d4e69
move sql querying and dataframe to stage1_load_sql_data()
randomshinichi Feb 15, 2021
8d8e3f6
pulldata.py: finished separating into stages
randomshinichi Feb 15, 2021
31528fc
remove cProfile; line_profiler is better
randomshinichi Feb 15, 2021
34b6cab
produce_actions(): how did that get double indented
randomshinichi Feb 15, 2021
bde7008
fixed crash on some token symbols
randomshinichi Feb 16, 2021
bc4649b
README.md: one less step
randomshinichi Feb 16, 2021
91e5dcf
stage1_load_sql_data(): instead of checking if the files do NOT exist…
randomshinichi Feb 16, 2021
4640019
Copy over price injection code
randomshinichi Feb 16, 2021
6dd2961
integrated price injection into pulldata.py
randomshinichi Feb 16, 2021
5bd2326
added -f argument to pulldata.py
randomshinichi Feb 16, 2021
58f9107
Removed the -prices directory, updated the README, removed add_extern…
randomshinichi Feb 16, 2021
d72180f
Merge pull request #60 from TokenEngineeringCommunity/andrew
Ramarti Feb 17, 2021
f7fe982
post_processing(): rewrite and added new columns as requested in #45
randomshinichi Feb 17, 2021
1786fee
Merge pull request #61 from TokenEngineeringCommunity/andrew
Ramarti Feb 19, 2021
bee885d
remove stray ipdb.set_trace()
randomshinichi Feb 22, 2021
c198488
post_processing(): change_datetime was always a str, converting to da…
randomshinichi Feb 22, 2021
9f25d19
Merge pull request #62 from TokenEngineeringCommunity/andrew
randomshinichi Feb 22, 2021
43f8bdb
0xf9ab7776c7baeed1d65f0492fe2bb3951a1787ef txhash_contractcalls.json
randomshinichi Feb 22, 2021
ba2e2c8
Squashed commit of the following:
Ramarti Feb 22, 2021
a62a48d
Update NB1-BalancerAMM-V1.0.ipynb
AngelaKTE Feb 22, 2021
4787abe
pulldata.py: try to maintain timestamps as python datetime.datetime t…
randomshinichi Feb 22, 2021
3c8551b
broke out Action class into action.py so that pickle can pickle it. A…
randomshinichi Feb 22, 2021
129a019
0xf9ab7776c7baeed1d65f0492fe2bb3951a1787ef actions
randomshinichi Feb 23, 2021
7296dbf
Merge remote-tracking branch 'origin/andrew' into NBupdate
AngelaKTE Feb 23, 2021
5035fca
Update NB1
AngelaKTE Feb 23, 2021
9574ca0
fees per transaction
Ramarti Feb 24, 2021
c30cc35
Update NB1-BalancerAMM-V1.0.ipynb
AngelaKTE Feb 24, 2021
94dd5ea
Merge pull request #63 from TokenEngineeringCommunity/NBupdate
Ramarti Feb 24, 2021
35bb564
Update NB1-BalancerAMM-V1.0.ipynb
AngelaKTE Feb 24, 2021
67a92b3
postprocessing: convert generated_fees_* to float64
randomshinichi Feb 24, 2021
611278a
Merge pull request #65 from TokenEngineeringCommunity/NBupdate
Ramarti Feb 25, 2021
3c43c92
NB modifications and VERBOSE mode to show warnings
Ramarti Feb 25, 2021
881e0c2
Update NB1-BalancerAMM-V1.0.ipynb
AngelaKTE Feb 25, 2021
d8b05c7
Merge pull request #66 from TokenEngineeringCommunity/NBupdate
Ramarti Feb 25, 2021
7f9f802
Update NB1-BalancerAMM-V1.0.ipynb
AngelaKTE Feb 25, 2021
62a9b68
Update NB1-BalancerAMM-V1.0.ipynb
AngelaKTE Feb 25, 2021
0bf56af
fix normalized weights
Ramarti Feb 26, 2021
10687f0
ignore *.pickle not .pickle
randomshinichi Feb 24, 2021
a1927a7
broke Raul's stage4 into separate file
randomshinichi Feb 24, 2021
5103fee
coingecko functions; broke save/load json/pickles into utils.py
randomshinichi Feb 24, 2021
4f2684f
can now produce price_actions from coingecko dataframe
randomshinichi Feb 25, 2021
52c585f
coingecko price data for 0x8b6e6e7b5b3801fed2cafd4b22b8a16c2f2db21a
randomshinichi Feb 25, 2021
81e493c
coingecko works!
randomshinichi Feb 26, 2021
63aecad
updated README.md
randomshinichi Feb 26, 2021
81e325a
no need to keep actions./initial-state jsons without prices anymore
randomshinichi Feb 26, 2021
a122745
really remove actions/initial pool state jsons without prices
randomshinichi Feb 26, 2021
9482bb7
Merge pull request #69 from TokenEngineeringCommunity/andrew
Ramarti Feb 26, 2021
d0b400e
post_processing(): cast even more types to float64
randomshinichi Feb 26, 2021
2c4a3b2
Merge remote-tracking branch 'origin/dev' into NBupdate
AngelaKTE Feb 26, 2021
7614200
0xf9ab JSONs
randomshinichi Feb 28, 2021
0fe3039
fix for 0x9fb: pool[pool_shares] was still a string, so p_join_pool()…
randomshinichi Feb 28, 2021
9c69380
Action: corrected typing hint, __repr__() to quickly see what an Acti…
randomshinichi Mar 2, 2021
f76d8f6
turn_events_into_actions: added detection of 1inch aggregate swaps (b…
randomshinichi Mar 2, 2021
1a6f71d
produce_actions(): renamed actions to fit new understanding
randomshinichi Mar 2, 2021
4c9540e
produce_actions(): add turn_grouped_by_txhash_events_into_list_and_un…
randomshinichi Mar 2, 2021
15ed636
Merge remote-tracking branch 'origin/dev' into NBupdate
AngelaKTE Mar 2, 2021
0ecc9da
Create NB1-PoolExploration-0x8b6-V1.0.ipynb
AngelaKTE Mar 2, 2021
855d3ec
Merge pull request #72 from TokenEngineeringCommunity/andrew
Ramarti Mar 3, 2021
0bb250b
Merge branch 'dev' into NBupdate
AngelaKTE Mar 3, 2021
c942ac7
updated data/README.md
randomshinichi Mar 4, 2021
e8ae9e2
NB1-update
AngelaKTE Mar 4, 2021
3299dfe
Merge pull request #67 from TokenEngineeringCommunity/NBupdate
Ramarti Mar 4, 2021
ab5733d
updated Coinbase WETHUSD, DAIUSD prices
randomshinichi Mar 4, 2021
c89b74f
updated 0x8b6e6e pool
randomshinichi Mar 4, 2021
01fba71
tradingview.py: removed stray ipdb.set_trace()
randomshinichi Mar 4, 2021
c1900ed
Update NB1-PoolExploration-0x8b6-V1.0.ipynb
AngelaKTE Mar 4, 2021
fa7e710
Merge pull request #73 from TokenEngineeringCommunity/NBupdate
Ramarti Mar 5, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ __pycache__/
static
venv/
.idea
.DS_Store
.ipynb_checkpoints/
.vscode/
*.pickle
349 changes: 0 additions & 349 deletions BalancerAMM-v01.ipynb

This file was deleted.

Loading