Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
7c282dc
indexer WIP
poliwop Apr 3, 2025
adf8175
Merge branch 'main' into indexer-data
poliwop Apr 16, 2025
318de39
pulling asset info, omnipool balances from indexer
poliwop Apr 16, 2025
ee07cb2
WIP pulling stableswap data
poliwop Apr 17, 2025
683ac76
WIP pulling stableswap data
poliwop Apr 17, 2025
625a4e2
WIP pulling stableswap data
poliwop Apr 18, 2025
c103a79
Added some more query logic
poliwop Apr 21, 2025
611fc67
application to test changing amplification
poliwop Apr 23, 2025
925128f
Merge branch 'main' into indexer-data
poliwop Apr 28, 2025
0fa9bbb
WIP looking at some oracle data
poliwop Apr 28, 2025
94ccf35
WIP looking at some oracle data
poliwop Apr 29, 2025
e3ccf9c
Adjusted discrepancy tolerance from 0.0001 to 0.0002, which does a be…
poliwop Apr 30, 2025
740339c
wip
jepidoptera May 2, 2025
050d9f6
get_current_omnipool
jepidoptera May 2, 2025
b5906e0
Merge branch 'refs/heads/main' into liquidations-modeling-streamlit
jepidoptera May 2, 2025
025ad44
update money market
jepidoptera May 2, 2025
8c989c1
default value_assets implementation
jepidoptera May 2, 2025
3021e18
add ABIs
jepidoptera May 2, 2025
1a5e7a0
more testing, wip
jepidoptera May 2, 2025
38c674b
move self.oracles definition
jepidoptera May 2, 2025
245712f
prune dependencies
jepidoptera May 5, 2025
e858241
get_omnipool_router
jepidoptera May 5, 2025
61b95a4
reconcile value_assets signature
jepidoptera May 5, 2025
30296b1
hdx_fees application
poliwop May 7, 2025
45e8a30
generalizing to any asset, taking asset id input
poliwop May 8, 2025
e8f7a9d
added pagination to fees query
poliwop May 8, 2025
b2660cf
hdx buybacks
poliwop May 9, 2025
4572222
fee vs volume comparison
poliwop May 12, 2025
744e001
toxic debt app
jepidoptera May 12, 2025
583008d
liquidate against all pools
jepidoptera May 12, 2025
970aa7b
expand get_stableswap_data
jepidoptera May 12, 2025
fb90f8d
some extensions
jepidoptera May 12, 2025
e8a2adb
shares = liquidity in add_tkn by default
jepidoptera May 12, 2025
72385b9
add unique_id
jepidoptera May 12, 2025
5228802
get fees and stableswap pools
jepidoptera May 12, 2025
3ca8abb
update import name
jepidoptera May 12, 2025
5367069
update function signatures
jepidoptera May 12, 2025
c40c0e3
allow multiple assets price changes
jepidoptera May 13, 2025
512bc7c
clarify fee function type
jepidoptera May 13, 2025
cbc5d15
allow exchanges to be passed as a list
jepidoptera May 13, 2025
4c4494c
fix buy_spot, sell_spot, calculate_buy_from_sell
jepidoptera May 13, 2025
bdf8b47
remove state.money_market as a separate property
jepidoptera May 13, 2025
4d88a83
add arb agent to simulation
jepidoptera May 13, 2025
b81be38
some refactoring
poliwop May 15, 2025
a825b0e
Removing temp project
poliwop May 15, 2025
a85da9d
Make default values for hdx buybacks more manageable
poliwop May 15, 2025
b9d3476
Make default values for hdx fees more manageable
poliwop May 15, 2025
6c0f9ef
Deleting temporary example app
poliwop May 15, 2025
3ee53d9
added tests for new apps
poliwop May 15, 2025
e5a7388
oracle to execution price comparison
poliwop May 16, 2025
61bafcf
fixed bugs, fixed tests
poliwop May 16, 2025
de78e34
WIP oracle comparision
poliwop May 20, 2025
48337bb
switched to spot price vs oracle price
poliwop May 21, 2025
7d2b7ee
Some oracle comparison updates. Added function to download and save s…
poliwop May 22, 2025
83148ca
bug fix in general_arbitrage
jepidoptera May 22, 2025
ff28cf8
refinements
jepidoptera May 22, 2025
c97f201
adjust to refactors
jepidoptera May 22, 2025
8e6d11c
add oracle_source parameter
jepidoptera May 22, 2025
694aef0
add test_toxic_debt
jepidoptera May 22, 2025
39bac76
rename
jepidoptera May 22, 2025
bedeced
rename
jepidoptera May 22, 2025
05b31ef
WIP on oracle comparison
poliwop May 22, 2025
f3f2599
Merge branch 'main' into indexer-data
poliwop May 23, 2025
db825b6
made test quicker
poliwop May 23, 2025
e9e2548
made test quicker.
poliwop May 23, 2025
fae8e08
better price path simulation
jepidoptera May 27, 2025
5bca9ba
use indexer version of get_current_omnipool_router
jepidoptera May 27, 2025
308347a
renamed and refactor get_current_omnipool_router
jepidoptera May 27, 2025
8dbb5d5
save and load stableswap pool pegs
jepidoptera May 27, 2025
da06d3e
WIP update, tests should be passing
poliwop May 29, 2025
47cad5a
Merge remote-tracking branch 'origin/indexer-data' into liquidations-…
jepidoptera May 29, 2025
3334ec9
add get_fee_history import
jepidoptera May 29, 2025
5990bc7
include more assets
jepidoptera May 29, 2025
9c32371
Merge branch 'main' into liquidations-modeling-streamlit
jepidoptera May 29, 2025
8eab93a
reinstate test_save_load
jepidoptera May 29, 2025
9e22a64
Merge branch 'indexer-data' into liquidations-modeling-streamlit
jepidoptera May 29, 2025
0f68cbc
fix merge conflicts
jepidoptera May 29, 2025
00eed37
WIP update, tests should be passing
poliwop May 30, 2025
a414add
test multi block update
jepidoptera May 30, 2025
6fc4ca3
implement multi block update
jepidoptera May 30, 2025
7fb30f6
add time_step property
jepidoptera May 30, 2025
98ba999
change "denominator" to "numeraire"
jepidoptera Jun 2, 2025
4bd9cc1
add missing trade strategy
jepidoptera Jun 2, 2025
a997356
optimized get_current_omnipool
jepidoptera Jun 3, 2025
e0535b2
add trade_to_price function
jepidoptera Jun 3, 2025
4c60e4a
remove "random" dependency
jepidoptera Jun 3, 2025
e983adb
add test_get_asset_info_by_ids
jepidoptera Jun 3, 2025
d9b8075
default fees at minimum, not zero
jepidoptera Jun 3, 2025
5b9af3f
remove duplicate import
jepidoptera Jun 3, 2025
821d310
added schedule_swaps
jepidoptera Jun 3, 2025
0211d9a
added test_schedule_swaps
jepidoptera Jun 3, 2025
801ffa2
relocate schedule_swaps to trade_strategies.py
jepidoptera Jun 3, 2025
0551e7f
add a comment calling out approximation
jepidoptera Jun 3, 2025
6fab7ec
add a comment about DOT/vDOT balances
jepidoptera Jun 3, 2025
047b86f
add a warning if the price doesn't reach its intended target
jepidoptera Jun 3, 2025
fed0f40
Merge branch 'indexer-data' into liquidations-modeling-streamlit
jepidoptera Jun 3, 2025
166aed6
reset test to avoid long integration test run
poliwop Jun 3, 2025
d5849fa
comment out failing tests
jepidoptera Jun 3, 2025
f769e9d
add test_trade_to_price
jepidoptera Jun 3, 2025
65056b5
Liquidations modeling streamlit (#214)
jepidoptera Jun 3, 2025
b925371
Adding data files
poliwop Jun 5, 2025
2eda950
Merge remote-tracking branch 'origin/indexer-data' into indexer-data
poliwop Jun 6, 2025
04f31a9
Added selection for token
poliwop Jun 9, 2025
a0deaa3
restored correlations draft
poliwop Jun 9, 2025
007c677
refactored oracle_comparison app so that integration test can be effi…
poliwop Jun 9, 2025
f397f71
removed commented out lines
poliwop Jun 9, 2025
3428afc
added test for arb_oracle_comp application
poliwop Jun 9, 2025
567a42f
added some logging to see where performance suffers
poliwop Jun 9, 2025
1a83360
fixed pathing in download tests
poliwop Jun 9, 2025
f5e0cdc
fixed pathing in download tests
poliwop Jun 9, 2025
59b3193
made test_download_acct_trades faster
poliwop Jun 9, 2025
17bbfc2
moved test_bucket_values to test_indexer_utils.py
poliwop Jun 9, 2025
6048b62
test updates
poliwop Jun 9, 2025
c1193b4
split off calculate_buy_shares
jepidoptera Jun 12, 2025
e386c32
faster spot price calculations
jepidoptera Jun 12, 2025
b23e290
fix agent holdings check
jepidoptera Jun 12, 2025
1b78548
test_add_remove_spot_prices
jepidoptera Jun 12, 2025
36bbec3
fix spot price calcs and agent holdings changes
jepidoptera Jun 12, 2025
a9a590c
add save/load money market
jepidoptera Jun 12, 2025
a32e42d
test save/load money market
jepidoptera Jun 12, 2025
f1bcd1e
refactor and add liquidator holdings graphs
jepidoptera Jun 12, 2025
e147a4a
save files for faster testing
jepidoptera Jun 12, 2025
40a6e7a
add clear_holdings
jepidoptera Jun 12, 2025
c82e3c2
fix incorrect liquidity check
jepidoptera Jun 12, 2025
a6b3745
rearrange a little
jepidoptera Jun 12, 2025
9e42b62
add calculate_sell_from_buy
jepidoptera Jun 12, 2025
2e9e8f3
add test_calculate_sell_from_buy
jepidoptera Jun 12, 2025
2be04b1
delete file
jepidoptera Jun 12, 2025
f62b4ab
allow testing with saved data
jepidoptera Jun 13, 2025
552dbff
test toxic_debt app with saved data (not live)
jepidoptera Jun 13, 2025
0ed3e4c
handle edge case in liquidate_cdps
jepidoptera Jun 13, 2025
78fd855
Merge branch 'oracle_update' into liquidations-modeling-streamlit
jepidoptera Jun 16, 2025
ff33b8c
merge
jepidoptera Jun 16, 2025
31aee08
merge changes from indexer-data
jepidoptera Jun 16, 2025
bad50b9
more informative output
jepidoptera Jun 19, 2025
c310d36
refine the definition of toxic debt
jepidoptera Jun 19, 2025
d96a581
fix bug in get_current_omnipool
jepidoptera Jun 19, 2025
63a8104
allow updates on a per-asset basis
jepidoptera Jun 19, 2025
3e5c713
update oracles only for assets which have changed
jepidoptera Jun 20, 2025
6a75308
track last_updated for each token
jepidoptera Jun 20, 2025
1c51bba
minimum update steps is 1
jepidoptera Jun 20, 2025
ddb79ce
fix test_oracle_one_empty_block
jepidoptera Jun 20, 2025
2fb9ddd
fix test_oracle_one_block_with_swaps
jepidoptera Jun 23, 2025
bf0486a
Merge branch 'refs/heads/main' into oracle_update
jepidoptera Jun 23, 2025
f2b4399
add test_oracle_multi_block
jepidoptera Jun 23, 2025
3ce134a
add flexibility to schedule_swaps
jepidoptera Jun 23, 2025
7ba8b06
Merge branch 'oracle_update' into liquidations-modeling-streamlit
jepidoptera Jun 23, 2025
78469ce
correct buy limit in calculate_buy_from_sell
jepidoptera Jun 24, 2025
4caa11b
bug fix in get_omnipool_liquidity
jepidoptera Jun 24, 2025
9a69831
fix asset list for test_stableswap_router_arbitrage
jepidoptera Jun 26, 2025
d2ed377
use find_test_directory
jepidoptera Jun 26, 2025
d8d70fd
add omnipool savefile to git
jepidoptera Jun 26, 2025
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
1 change: 1 addition & 0 deletions hydradx/apps/money_market/archive/omnipool_savefile.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"liquidity": {"ASTR": 91851704.0671586, "PHA": 6817527.552585253, "DOT": 3207643.663025053, "vASTR": 17847034.878898583, "RING": 32856704.572366316, "KILT": 3906109.0384923457, "CRU": 668866.045433287, "WETH": 413.5781929988904, "WBTC": 8.33934429, "INTR": 79557783.10515049, "GLMR": 15434227.195950918, "vDOT": 192578.285210225, "BNC": 7516154.75690782, "CFG": 3729523.7930723545, "ZTG": 9227869.440144313, "iBTC": 8.49525378, "2-Pool-Stbl": 18391754.773637153, "2-Pool": 0.4222930236140139, "4-Pool": 1183636.0959366278, "SKY": 2957826.292445171, "LINK": 14463.831778376465, "KSM": 32840.91886478404, "tBTC": 44.59624674073935, "SOL": 663.239138474, "AAVE": 3890.358038878923, "HDX": 81347001.44640957}, "LRNA": {"ASTR": 116817.19632612474, "PHA": 39277.151929705644, "DOT": 615961.7016476875, "vASTR": 28280.34491968246, "RING": 1863.873466405159, "KILT": 6146.981077203859, "CRU": 2108.081623787362, "WETH": 51184.78942416462, "WBTC": 41051.044876415326, "INTR": 10569.873374162058, "GLMR": 60879.40262394179, "vDOT": 55718.27816689152, "BNC": 46837.78674626261, "CFG": 31344.11115102349, "ZTG": 3306.3795892093, "iBTC": 42030.95169095365, "2-Pool-Stbl": 835212.1022545185, "2-Pool": 1474.19973502776, "4-Pool": 55023.38252692069, "SKY": 11632.710806969893, "LINK": 9825.890160562683, "KSM": 25702.40744153758, "tBTC": 218910.57573004972, "SOL": 4852.910301000598, "AAVE": 53286.052525670806, "HDX": 41900.87729196094}, "asset_fee": {"ASTR": 0.014099, "PHA": 0.0035000000000015305, "DOT": 0.05, "vASTR": 0.0015, "RING": 0.0015, "KILT": 0.0015, "CRU": 0.0015, "WETH": 0.001500000000000028, "WBTC": 0.0015, "INTR": 0.0015, "GLMR": 0.0015, "vDOT": 0.05, "BNC": 0.0015, "CFG": 0.0015, "ZTG": 0.0015, "iBTC": 0.05, "2-Pool-Stbl": 0.05, "2-Pool": 0.0015, "4-Pool": 0.0015, "SKY": 0.05, "LINK": 0.0015, "KSM": 0.0015, "tBTC": 0.05, "SOL": 0.017375000608004374, "AAVE": 0.05, "HDX": 0.05}, "lrna_fee": {"ASTR": 0.01, "PHA": 0.01, "DOT": 0.01, "vASTR": 0.0005, "RING": 0.0015, "KILT": 0.0005, "CRU": 0.0005, "WETH": 0.0005002500317392524, "WBTC": 0.01, "INTR": 0.0005, "GLMR": 0.0005, "vDOT": 0.01, "BNC": 0.0005, "CFG": 0.0005, "ZTG": 0.0005, "iBTC": 0.0005, "2-Pool-Stbl": 0.01, "2-Pool": 0.0015, "4-Pool": 0.01, "SKY": 0.01, "LINK": 0.0005, "KSM": 0.0005, "tBTC": 0.01, "SOL": 0.01, "AAVE": 0.01, "HDX": 0.01}, "stableswap_pools": [{"tokens": {"USDT": 268089.054547, "DAI": 313673.44974789966, "USDC": 343106.659368}, "amplification": 320, "trade_fee": 0.02, "unique_id": "4-Pool", "shares": 924854.2531699062, "peg": [1, 1]}, {"tokens": {"iBTC": 0.22061119, "WBTC": 0.23250268}, "amplification": 5, "trade_fee": 0.02, "unique_id": "2-Pool", "shares": 0.453087849936992, "peg": [1]}, {"tokens": {"USDT": 10136807.752393, "USDC": 10518353.4334}, "amplification": 100, "trade_fee": 0.02, "unique_id": "2-Pool-Stbl", "shares": 20655126.28308283, "peg": [1]}, {"tokens": {"DOT": 4007995.0718074203, "vDOT": 2660139.429446303}, "amplification": 100, "trade_fee": 0.069, "unique_id": "2-Pool-GDOT", "shares": 8015990.143614842, "peg": [1.506686088496372]}]}
1 change: 1 addition & 0 deletions hydradx/apps/money_market/archive/test_mm.json

Large diffs are not rendered by default.

Loading