Repository navigation
tests: a USD residue sweep is a dry-run scenario - #5
Merged
Merged
Conversation
Two-leg sales (ZEC -> USD -> USDT) leave about 0.5% of each sale in USD: the USDT buy keeps back a fee margin so it can never overspend. The deployment sweeps that USD by listing USD in AUTOCONVERT_ASSETS, which takes a direct route on which the settlement currency is *bought* (USDTUSD), not sold. That path had no scenario, so the DRY_RUN guarantee was untested on it. It does now. Mutation-checked: treating every direct route as a sell market fails the live half of the scenario. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tests only, no code change. The deployment sweeps the USD that two-leg sales leave behind by adding
USDtoAUTOCONVERT_ASSETS(cake-tech/ansible, same day). That takes a direct route on which USDT is bought on USDTUSD, a path the dry-run scenario table didn't cover.This adds it to
DryRunNeverMovesFunds. Treating every direct route as a sell market makes the scenario fail.Checked against Kraken's live pairs and books, with private calls stubbed:
🤖 Generated with Claude Code