Skip to content

feat: Phase 1 IBC Eureka Integration#17

Open
zmanian wants to merge 14 commits into
mainfrom
feature/phase1-eureka-integration
Open

feat: Phase 1 IBC Eureka Integration#17
zmanian wants to merge 14 commits into
mainfrom
feature/phase1-eureka-integration

Conversation

@zmanian
Copy link
Copy Markdown
Contributor

@zmanian zmanian commented Jan 5, 2026

Summary

  • Enables atom-intents solvers to source liquidity from Ethereum via IBC Eureka
  • Solvers compete in auctions regardless of liquidity source (Cosmos or Ethereum)
  • Users control asset delivery preferences (native only, accept bridged, any equivalent)

Changes

Types (crates/types)

  • AssetPreference: User controls what assets they accept (NativeOnly, AcceptBridged, AnyEquivalent)
  • SettlementPreference: Optimize for cost (default) or latency
  • Ecosystem: Supported ecosystems (Cosmos, Ethereum, Near)
  • SettlementPath: How assets reach the user (CosmosIbc, Eureka, NearOmnibridge)
  • SolutionMetadata: Cross-ecosystem metadata on solver solutions

Settlement (crates/settlement)

  • EurekaDirection: CosmosToEthereum / EthereumToCosmos
  • IbcFlowType::Eureka: New flow type with 5x timeout multiplier for ZK proofs
  • build_eureka_memo(): Helper for Eureka-specific IBC memos
  • Eureka routes: cosmoshub-4 ↔ ethereum-1, ethereum-1 → osmosis-1

Solver (crates/solver)

  • EurekaSolver: Sources Ethereum liquidity via Skip Go Eureka API
  • Skip Go Eureka API: Extended client with get_eureka_quote()
  • Constraint validation: Asset preference, settlement time checks

Test Plan

  • 600+ tests passing across workspace
  • Clippy passes with -D warnings
  • Cargo fmt clean
  • Integration tests for EurekaSolver

Design Docs

  • docs/plans/2026-01-05-unified-cross-ecosystem-design.md - Architecture design
  • docs/plans/2026-01-05-phase1-eureka-integration.md - Implementation plan
  • docs/plans/2026-01-05-phase2-ethereum-escrow-design.md - Future: ETH user escrow flow

Future Work (Phase 2)

Phase 2 will enable Ethereum users to escrow funds via Eureka, with solvers fronting Cosmos-side funds and taking settlement risk.

🤖 Generated with Claude Code

zmanian and others added 14 commits January 5, 2026 11:40
…nConstraints

Adds user-controlled preferences for:
- Asset delivery (native only, bridged, or any equivalent)
- Settlement optimization (cost vs latency)
- Maximum settlement time constraint

Part of Phase 1 Eureka integration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Security fix: asset_preference, settlement_preference, and max_settlement_secs
are now included in Intent signing hash to prevent tampering.

Also fixes clippy warnings by using derive(Default) with #[default] attribute.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add IBC Eureka support to settlement layer:
- EurekaDirection enum (CosmosToEthereum, EthereumToCosmos)
- Eureka variant in IbcFlowType
- 5x timeout multiplier for ZK proof generation
- build_eureka_memo helper for Eureka-specific transfers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add cross-ecosystem types for Phase 1 Eureka integration:
- Ecosystem enum (Cosmos, Ethereum, Near)
- EurekaDirection, OmnibridgeDirection for bridge routing
- SettlementPath with estimated time/cost helpers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds ecosystem metadata to solver solutions:
- SolutionMetadata struct with settlement path info
- Helper constructors for Cosmos IBC and Eureka
- Optional metadata field on Solution for backwards compatibility
- Updated existing Solution constructors with metadata: None

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add Eureka API integration to Skip Go client:
- EurekaRouteRequest/Response types
- is_ethereum_chain helper
- get_eureka_quote method for Ethereum ↔ Cosmos quotes
- EurekaQuote type with time/cost estimates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add #[allow(dead_code)] to API response structs for deserialization
- Make Asset struct public for public API
- Fix unused parameter warnings
- Replace manual modulo check with is_multiple_of()
- Simplify network assignment in cex withdraw

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements Solver trait for cross-ecosystem liquidity via IBC Eureka:
- EurekaSolver with Skip Go integration
- Asset preference checking (native vs bridged delivery)
- Settlement time constraint validation
- Cross-ecosystem execution metadata

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add IBC Eureka routes for Ethereum connectivity:
- cosmoshub-4 ↔ ethereum-1 direct Eureka routes
- ethereum-1 → osmosis-1 via Hub (Eureka + IBC)
- is_eureka() helper method on Route

Also fix clippy warnings in settlement crate:
- Replace or_insert_with(Vec::new) with or_default()
- Replace redundant closures with associated function refs
- Replace cloned slice with std::slice::from_ref

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Integration tests for EurekaSolver:
- Solver setup and configuration
- Constraint validation (AssetPreference)
- Time constraint validation (max_settlement_secs)
- Capacity queries
- Cross-ecosystem rejection tests
- Health check verification
- Live quote test (ignored by default, requires network)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Export new modules and types:
- types: ecosystem module (Ecosystem, SettlementPath, etc.) - already present
- solver: eureka module (EurekaSolver) - already present
- settlement: EurekaDirection, build_eureka_memo - added

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Apply cargo fmt formatting to ecosystem.rs, execution.rs, ibc.rs,
  adversarial_signature_tests.rs
- Fix unused variable warnings in denom.rs and fees.rs tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Apply formatting fixes and resolve clippy warnings:
- Add #[allow(clippy::too_many_arguments)] for functions with many params
- Add #[allow(dead_code)] for unused but intended-for-future functions
- Use idiomatic Rust patterns (or_default, is_err, range contains)
- Remove needless borrows

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Design document covering:
- Ethereum → Cosmos escrow via IBC Eureka
- Solver fronting with settlement risk
- Eureka packet monitoring
- Risk pricing and bond calculations
- Settlement contract changes

This enables ETH users to participate in atom-intents auctions
with solvers taking on Eureka settlement risk.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant