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

POC: Event Driven DFMM Sim #333

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
45 changes: 24 additions & 21 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,49 +16,55 @@ members = ["crates/*", "documentation"]
[workspace.dependencies]
# Local
bindings = { path = "./crates/bindings", version = "0.1.0" }
analysis = { path = "./crates/analysis", version = "0.1.0" }
cfmm_math = { path = "./crates/cfmm_math", version = "0.1.0" }
clients = { path = "./crates/clients", version = "0.1.0" }
sim = { path = "./crates/sim", version = "0.1.0" }
sim_v2 = { path = "./crates/sim-v2", version = "0.1.0" }
datatypes = { path = "./crates/datatypes", version = "0.1.0" }

# External
arbiter-bindings = { version = "0.1.0" }
arbiter-core = { git = "https://github.com/primitivefinance/arbiter", branch = "experimental/close-with-db" }
ethers = { version = "=2.0.10", features = ["ws", "openssl", "rustls"] }
ethers-core = "2.0.4"
arbiter-bindings = { git = "https://github.com/primitivefinance/arbiter", branch = "main" }
arbiter-core = { git = "https://github.com/primitivefinance/arbiter", branch = "main" }
arbiter-engine = { git = "https://github.com/primitivefinance/arbiter", branch = "main" }
arbiter-macros = { git = "https://github.com/primitivefinance/arbiter", branch = "main" }
ethers = { version = "=2.0.13", features = [
"ws",
"openssl",
"rustls",
"abigen",
] }
ethers-core = "2.0.13"

# ethereum types
revm = { version = "=3.5.0", features = ["ethersdb", "std", "serde"] }
revm-primitives = { version = "=1.3.0" }
alloy-primitives = { version = "0.5.0", features = ["serde"] }
alloy-sol-types = "0.5.2"
alloy-providers = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }
alloy-networks = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }
alloy-networks = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }
alloy-rpc-client = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61", features = [
"pubsub",
"ws",
"reqwest",
] }
alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }
alloy-transport-ws = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }
alloy-transport-http = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }
alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }
alloy-transport-ws = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }
alloy-transport-http = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }
alloy-rlp = "0.3"
alloy-pubsub = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }
alloy-signer = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }
alloy-pubsub = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }
alloy-signer = { git = "https://github.com/alloy-rs/alloy.git", rev = "0ba6b61" }


reqwest = "=0.11.23"


## Config and parsing
serde = "=1.0.192"
serde_json = "=1.0.108"
serde_with = { version = "=3.4.0", features = ["chrono_0_4"] }
serde = "=1.0.196"
serde_json = "=1.0.113"
serde_with = { version = "=3.6.0", features = ["chrono_0_4"] }
config = "0.13.3"

## Async
tokio = { version = "=1.35.1", features = ["macros", "full"] }
tokio = { version = "=1.36.0", features = ["macros", "full"] }
tokio-util = "=0.7.10"
async-trait = "=0.1.77"

Expand All @@ -67,7 +73,7 @@ tracing = "=0.1.40"
tracing-subscriber = { version = "=0.3.18", features = ["env-filter"] }
tracing-futures = { version = "=0.2.5", default-features = false }
anyhow = "=1.0.79"
thiserror = "=1.0.50"
thiserror = "=1.0.56"

itertools = "=0.12.0"
rand = "=0.8.5"
Expand All @@ -93,14 +99,11 @@ chrono = { version = "=0.4.31", features = ["serde"] }

[dependencies]
# main excalibur application
app = { path = "./crates/app", version = "0.1.0" }
sim = { path = "./crates/sim", version = "0.1.0" }

sim_v2 = { path = "./crates/sim-v2", version = "0.1.0" }
clap = { version = "=4.4.14", features = ["derive"] }

criterion.workspace = true
cfmm_math.workspace = true
analysis.workspace = true

tokio.workspace = true
tracing.workspace = true
Expand Down
6 changes: 3 additions & 3 deletions bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ fn main() -> Result<()> {
}

match &args.command {
Some(Commands::Simulate { config_path }) => sim::run(config_path, args.verbose)?,
Some(Commands::Analyze) => todo!(),
Some(Commands::Ui) => app::run(args.dev)?,
None => app::run(args.dev)?,
Some(Commands::Simulate { config_path }) => todo!(),
Some(Commands::Ui) => todo!(),
None => sim_v2::run()?,
}
Ok(())
}
24 changes: 0 additions & 24 deletions crates/analysis/Cargo.toml

This file was deleted.

Binary file removed crates/analysis/backtest_1000_days.png
Binary file not shown.
Binary file removed crates/analysis/plot_figs.png
Binary file not shown.
182 changes: 0 additions & 182 deletions crates/analysis/src/lib.rs

This file was deleted.

Loading
Loading