Skip to content

feat: fluid v2 simulation#527

Open
zach030 wants to merge 30 commits intomainfrom
feat/fluid_v2
Open

feat: fluid v2 simulation#527
zach030 wants to merge 30 commits intomainfrom
feat/fluid_v2

Conversation

@zach030
Copy link
Copy Markdown
Contributor

@zach030 zach030 commented Feb 10, 2026

No description provided.

zizou0x and others added 22 commits March 31, 2026 15:33
… changes

TransitionError generic was removed in tycho-common 0.144.0. This PR adjust tycho-simulation to work with the latest version.
## [0.248.1](0.248.0...0.248.1) (2026-03-06)

### Bug Fixes

* update dependencies and adjust interfaces with upstream breaking changes ([2953077](2953077))
Dispatches the compatibility-check workflow in propeller-heads/tycho
whenever a release is published, keeping the meta-crate in sync.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…checks

Replace assert! panics with SimulationError::InvalidInput returns in the
swap price limit validation for UniswapV3, UniswapV4, Velodrome, and
Aerodrome slipstreams. Prevents crashes during depth calculation when
price moves beyond the maximum trade amount.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Test that out-of-range price limits return SimulationError::InvalidInput
instead of panicking, including the depth calculation scenario where
pool sqrt_price reaches MIN_SQRT_RATIO + 1.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
## [0.248.2](0.248.1...0.248.2) (2026-03-12)

### Bug Fixes

* replace assert! panics with SimulationError in swap price limit checks ([bcaa584](bcaa584))
## [0.248.3](0.248.2...0.248.3) (2026-03-12)

### Bug Fixes

* force-overwrite proxy token accounts to prevent stale placeholders ([45f87ae](45f87ae))
* overwrite existing accounts on ChangeType::Creation ([af6bb78](af6bb78))
* split proxy account updates by change type for proper handling ([1061193](1061193))
…est CLI

Add --min-token-quality and --max-days-since-last-trade CLI args to the
integration test binary, wiring them into the load_all_tokens call
instead of the previous hardcoded None defaults.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add --tvl-buffer-ratio CLI arg (default 1.1) to support TVL hysteresis
filtering, matching the tycho-solver pattern. The lower bound of the TVL
filter is now tvl_threshold / tvl_buffer_ratio instead of tvl_threshold.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
## [0.249.0](0.248.3...0.249.0) (2026-03-16)

### Features

* add TVL buffer ratio to integration test CLI ([647875a](647875a))
* expose token quality and traded days filtering on integration test CLI ([0fa87c0](0fa87c0))
This is needed to be compatible with latest tycho-client version (see propeller-heads/tycho-indexer@3e0e75f)
## [0.250.0](0.249.0...0.250.0) (2026-03-16)

### Features

* update lru dependency ([87a6694](87a6694))
Done:
- Update usages of tycho_execution with tycho_contracts (temporarily)
- Change interfaces (structs) and method calls to match new code
- Define Transaction in tycho_test - this is not available in tycho_contracts anymore
- Update executor storage slot overwrite
- Add FeeCalculator overwrite. TychoRouter v3 does not allow the FeeCalculator to be address(0) so we need to add overwrites for it too.

Took 2 hours 0 minutes

Took 3 minutes
Swap now takes tokens as Bytes and not Token

Took 8 minutes
Replace 6 assert\!() calls in production swap math with proper
SimulationError::FatalError returns. These assertions could crash
Fynd when derived computations hit pools with extreme states.

Add 6 tests covering each error path.
semantic-release-bot and others added 3 commits March 31, 2026 15:33
## [0.250.1](0.250.0...0.250.1) (2026-03-24)

### Bug Fixes

* replace assert\! panics with error returns in sqrt_price_math ([bb6a1f8](bb6a1f8))
## [0.251.0](0.250.1...0.251.0) (2026-03-25)

### Features

* Upgrade to use tycho_contracts (Router v3) ([41d783e](41d783e))
* Use newly deploy tycho-execution (Router v3) ([8201331](8201331))

### Bug Fixes

* Update tycho-execution to 0.167.0 ([1d57d89](1d57d89))
…n fluid_v2

Remove spurious `<String>` generic from `TransitionError` to match
tycho-common v0.149.0 API. Conditionally extract `lp_fee` vs dynamic fee
fields (max_decay_time, min_fee, max_fee, etc.) based on `fee_version` in
`DexVariables2::from_packed`, since they share the same bit offset [156:]
in the packed storage.

Co-Authored-By: Claude Opus 4.6 <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

Status: Todo

Development

Successfully merging this pull request may close these issues.

7 participants