Skip to content

tests: a USD residue sweep is a dry-run scenario - #5

Merged
sethforprivacy merged 1 commit into
mainfrom
cake/usd-residue-sweep
Oct 20, 2026
Merged

sethforprivacy merged 1 commit into
mainfrom
cake/usd-residue-sweep

Conversation

@sethforprivacy

Copy link
Copy Markdown

Tests only, no code change. The deployment sweeps the USD that two-leg sales leave behind by adding USD to AUTOCONVERT_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:

  • $10.52 becomes a buy of 10.483 USDT on USDTUSD at limit 1.00378, above the ask;
  • $3.10 is skipped as below the 5 USDT minimum.

🤖 Generated with Claude Code

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>
@sethforprivacy
sethforprivacy merged commit 7559c4a into main Oct 20, 2026
1 check passed
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