Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic fee parameters #191

Open
wants to merge 47 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
1379ef2
notebook to examine different fee parameters
jepidoptera Jul 1, 2024
5398057
change "jan" to "January"
jepidoptera Jul 1, 2024
9c5428c
add frequency paramater to omnipool_arbitrage
jepidoptera Jul 1, 2024
84468fe
simplified notebook version
jepidoptera Jul 1, 2024
1d97c4b
corrected absolute imports to relative
jepidoptera Jul 2, 2024
d2566cd
streamlined output method, show graphs for two scenarios
jepidoptera Jul 2, 2024
a9a1fe9
trouble getting SQLPad data except for this one query
jepidoptera Jul 8, 2024
808114d
notebook examining recorded vs simulated dynamic fees in Omnipool
jepidoptera Jul 11, 2024
64628d0
remove one irrelevant cell and regenerate plots
jepidoptera Jul 11, 2024
733039c
measure price against USDC
jepidoptera Jul 12, 2024
4d8ebaa
update volume_in and volume_out data in lrna_swap
jepidoptera Jul 18, 2024
80eabab
simulate dynamic fee with historical trades, compare with historical …
jepidoptera Jul 18, 2024
00da71b
simulate dynamic fee with historical trades, compare with historical …
jepidoptera Jul 18, 2024
62f06aa
refactor get_omnipool_balance_history
jepidoptera Aug 6, 2024
03673d7
comment out this LRNA holdings check because it makes some test fail
jepidoptera Aug 6, 2024
ec4daf8
add dateutil requirement
jepidoptera Aug 6, 2024
ab7ac65
when loading history, use data from .model directory
jepidoptera Aug 6, 2024
f6ded52
add history data files to model folder
jepidoptera Aug 6, 2024
13b2188
change 'round' to 'int'
jepidoptera Aug 6, 2024
a72d00a
handle end of data gracefully
jepidoptera Aug 6, 2024
af4af35
ran
jepidoptera Aug 6, 2024
eb15db2
download latest
jepidoptera Aug 6, 2024
f1a8270
delete
jepidoptera Aug 6, 2024
097ede2
test balance history load
jepidoptera Aug 6, 2024
2daa5a0
delete last cell
jepidoptera Aug 6, 2024
bad7966
ignore data files in notebooks/Misc
jepidoptera Aug 6, 2024
77dd8ba
run once more
jepidoptera Aug 6, 2024
a5d5598
replace swap_lrna calls with swap
jepidoptera Sep 10, 2024
6334c72
use spot prices for both recorded and simulated fees
jepidoptera Sep 10, 2024
8222b9b
mark _lrna_swap as a private method so oracle update will happen corr…
jepidoptera Sep 10, 2024
f9d5caa
GlobalState.evolve() returns self
jepidoptera Sep 10, 2024
c6f0087
fix test_oracle_one_block_with_swaps
jepidoptera Sep 12, 2024
a692cf1
fix test_stableswap_router_arbitrage
jepidoptera Sep 12, 2024
99aee75
add model/data folder
jepidoptera Sep 13, 2024
8a32f5f
notebook examining difference in cash out value between LPs who bough…
jepidoptera Sep 13, 2024
f458346
fix price curve
jepidoptera Sep 13, 2024
bc1dae9
add axis labels
jepidoptera Sep 13, 2024
ef3b0c1
formatting
jepidoptera Sep 17, 2024
a779c73
add graphs separating DOT and LRNA returns
jepidoptera Sep 17, 2024
30cd807
remove widthdrawal fee
jepidoptera Sep 17, 2024
27cca4a
add additional sanity check to test_remove_liquidity_no_fee
jepidoptera Sep 17, 2024
374626f
add a graph tracking the ratio of agent1_value/agent2/value
jepidoptera Sep 19, 2024
16cda57
add shares option to omnipool setup
jepidoptera Sep 19, 2024
43563ad
increase range and flexibility of simulation
jepidoptera Sep 19, 2024
8b26ac7
delete stale notebook
jepidoptera Sep 23, 2024
05fff8b
include instructions for adding .env file with sqlpad username and pa…
jepidoptera Sep 23, 2024
e2c2c19
delete stale notebook
jepidoptera Sep 23, 2024
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 @@ -9,6 +9,8 @@
/.idea/
/hydradx/tests/.hypothesis/
/hydradx/notebooks/Omnipool/data/
/hydradx/notebooks/Misc/data/
/hydradx/other tests/.hypothesis/
/hydradx/model/data/
/.hypothesis/
*.env
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ Installation:
* Clone the repository and navigate to the root folder, HydraDx-simulations
* In terminal, enter 'pip install -r requirements.txt'
* Alternatively, open the project folder in PyCharm, and you'll be prompted to create a virtual environment for this project.
* If you want to pull data from SQLPad, add a .env file to ./hydradx/model/ with the following contents:
```
SQLPAD_USERNAME=<your username>
PASSWORD=<your password>
```
2 changes: 2 additions & 0 deletions hydradx/model/amm/global_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ def evolve(self):
pool.update()
if self._evolve_function:
return self._evolve_function(self)
else:
return self

def execute_swap(
self,
Expand Down
2 changes: 1 addition & 1 deletion hydradx/model/amm/liquidations.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import copy

from hydradx.model.amm.agents import Agent
from .agents import Agent


class CDP:
Expand Down
Loading