From b5b91bffe00553a70cf98cc0e7596d3a9abbe0e6 Mon Sep 17 00:00:00 2001 From: Thales Vinagre Date: Tue, 28 Jul 2026 17:38:54 +0000 Subject: [PATCH] feat: add Robinhood Chain hop tokens and chain config Add default hop (connector) tokens for Robinhood Chain: - WETH (0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73) - USDG (0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168) - ETH native (0x0000000000000000000000000000000000000000) Robinhood Chain uses USDG as its stablecoin (no USDC/USDT/DAI/WBTC). Changes: - robinhood_pools.toml: worker-pools config with WETH+USDG+ETH as connector tokens for most_liquid and path_frank_wolfe algorithms - chains.yaml: custom chain registry for chain_id 4663 (1s block time, ETH native, WETH wrapped native, ETH-tier TVL thresholds) - fynd-rpc/src/config.rs: add robinhood to default_tycho_url and default_rpc_url so fynd serve --chain robinhood works out-of-the-box - tools/hindsight/src/resolve/monitor.rs: add robinhood block time (1s) to default_lag_blocks ENG-6264 --- chains.yaml | 20 +++++++++++++++++ fynd-rpc/src/config.rs | 2 ++ robinhood_pools.toml | 31 ++++++++++++++++++++++++++ tools/hindsight/src/resolve/monitor.rs | 1 + 4 files changed, 54 insertions(+) create mode 100644 chains.yaml create mode 100644 robinhood_pools.toml diff --git a/chains.yaml b/chains.yaml new file mode 100644 index 000000000..41d2fb9e3 --- /dev/null +++ b/chains.yaml @@ -0,0 +1,20 @@ +# Custom chain registry for Robinhood Chain. +# +# Fynd / tycho-common use this to register "robinhood" as a custom chain until +# Chain::Robinhood ships as a first-class variant in the upstream tycho-common crate. +# Pass via `--chains-config chains.yaml` or `TYCHO_CHAINS_CONFIG=chains.yaml`. +chains: + - name: robinhood + chain_id: 4663 + block_time_secs: 1 + native: + address: "0x0000000000000000000000000000000000000000" + symbol: "ETH" + decimals: 18 + wrapped_native: + address: "0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73" + symbol: "WETH" + decimals: 18 + default_tvl_thresholds: + low: 10 + medium: 100 \ No newline at end of file diff --git a/fynd-rpc/src/config.rs b/fynd-rpc/src/config.rs index 6a611b941..5ce1d395a 100644 --- a/fynd-rpc/src/config.rs +++ b/fynd-rpc/src/config.rs @@ -181,6 +181,7 @@ pub mod defaults { "bsc" => Ok("https://bsc-dataseed.bnbchain.org"), "arbitrum" => Ok("https://arbitrum.drpc.org"), "polygon" => Ok("https://polygon.drpc.org"), + "robinhood" => Ok("https://rpc.mainnet.chain.robinhood.com"), other => Err(format!( "no default RPC URL for chain '{}'. Please provide --rpc-url explicitly.", other @@ -205,6 +206,7 @@ pub mod defaults { "bsc" => Ok("tycho-bsc-beta.propellerheads.xyz"), "arbitrum" => Ok("tycho-arbitrum-beta.propellerheads.xyz"), "polygon" => Ok("tycho-polygon-beta.propellerheads.xyz"), + "robinhood" => Ok("tycho-robinhood-beta.propellerheads.xyz"), other => Err(format!( "no default Tycho URL for chain '{}'. Please provide --tycho-url explicitly.", other diff --git a/robinhood_pools.toml b/robinhood_pools.toml new file mode 100644 index 000000000..72de403b1 --- /dev/null +++ b/robinhood_pools.toml @@ -0,0 +1,31 @@ +# Worker-pools config for running Fynd on Robinhood Chain (chain-id 4663) — pass with +# `--worker-pools-config robinhood_pools.toml` (e.g. `hindsight monitor --chain robinhood`). +# +# Two pools run concurrently; the router keeps the best result by amount_out_net_gas. +# most_liquid is the cheap single-path baseline; path_frank_wolfe adds split routing that +# helps larger trades. Both restrict intermediate hops to Robinhood Chain's most-connected +# tokens. Robinhood Chain uses USDG as its stablecoin (no USDC/USDT/DAI/WBTC). + +[pools.most_liquid_robinhood] +algorithm = "most_liquid" +num_workers = 3 +task_queue_capacity = 1000 +max_hops = 3 +timeout_ms = 500 +connector_tokens = [ + "0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73", # WETH + "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168", # USDG + "0x0000000000000000000000000000000000000000", # ETH (native gas) +] + +[pools.path_frank_wolfe_robinhood] +algorithm = "path_frank_wolfe" +num_workers = 3 +task_queue_capacity = 1000 +max_hops = 3 +timeout_ms = 1000 +connector_tokens = [ + "0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73", # WETH + "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168", # USDG + "0x0000000000000000000000000000000000000000", # ETH (native gas) +] \ No newline at end of file diff --git a/tools/hindsight/src/resolve/monitor.rs b/tools/hindsight/src/resolve/monitor.rs index fc33a3452..d579a8c01 100644 --- a/tools/hindsight/src/resolve/monitor.rs +++ b/tools/hindsight/src/resolve/monitor.rs @@ -323,6 +323,7 @@ async fn build_solver( fn default_lag_blocks(chain: &str) -> u64 { let block_secs = match chain.to_lowercase().as_str() { "base" => 2, + "robinhood" => 1, _ => 12, }; (20 * 60 / block_secs).max(1)