Skip to content
Merged
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
8 changes: 8 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Charon environment variables.
# Copy to `.env` and fill in real values. `.env` is git-ignored.

# BNB Chain RPC endpoints.
# Public defaults work for testing but are rate-limited; swap in a private
# endpoint (QuickNode / Ankr / Blast / your own node) for production use.
BNB_WS_URL=wss://bsc-rpc.publicnode.com
BNB_HTTP_URL=https://bsc-rpc.publicnode.com
55 changes: 53 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions config/default.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Charon — v1 config (Venus on BNB Chain)
#
# Secrets (RPC URLs) are referenced via ${ENV_VAR} and substituted from
# the environment at load time. See `.env.example` for the expected vars.

[bot]
# Drop opportunities below this USD profit threshold, in USD × 1e6.
# 5_000_000 = $5.00. Integer fixed-point to avoid f64 precision.
min_profit_usd_1e6 = 5000000
# Skip liquidations when gas price exceeds this, in wei (decimal string).
# "3000000000" = 3 gwei. Sub-gwei priority fees are representable.
max_gas_wei = "3000000000"
# Polling cadence for protocols without push events (ms).
scan_interval_ms = 1000

# ── Chains ────────────────────────────────────────────────────────────────
[chain.bnb]
chain_id = 56
ws_url = "${BNB_WS_URL}"
http_url = "${BNB_HTTP_URL}"

# ── Lending protocols ─────────────────────────────────────────────────────
[protocol.venus]
chain = "bnb"
# Venus Unitroller (main comptroller on BSC)
comptroller = "0xfd36e2c2a6789db23113685031d7f16329158384"

# ── Flash-loan sources ────────────────────────────────────────────────────
[flashloan.aave_v3_bsc]
chain = "bnb"
# Aave V3 Pool on BSC (used for flashLoanSimple — 0.05% fee)
pool = "0x6807dc923806fe8fd134338eabca509979a7e0cb"

# ── Deployed liquidator contracts ─────────────────────────────────────────
# Populated once CharonLiquidator.sol is deployed on BSC mainnet. Do not
# add a zero-address placeholder — config validation rejects it.
1 change: 1 addition & 0 deletions crates/charon-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ alloy = { workspace = true }
serde = { workspace = true }
anyhow = { workspace = true }
async-trait = { workspace = true }
toml = { workspace = true }
thiserror = { workspace = true }
Loading