Repository navigation
Conversation
alex-arb-receiver-v5 requires min-alex-out set fresh before each call -- it auto-resets to 0 after every successful execution, specifically to force re-calibration rather than silently reusing a stale slippage value. monitor-alex-arb.mjs's executeAlexArb never called set-min-alex-out at all. Checked the live on-chain state before fixing, not assumed: min-alex-out is currently 6,890,524,177,442, a leftover value from some earlier setup with no relation to this script's current 10 STX test loan (which quotes ~697 ALEX, ~69.7 billion raw units -- two orders of magnitude below the stale threshold). Flipping EXECUTE=true as the script stood would not have reverted cleanly at the ERR-MIN-ALEX-UNSET guard as expected -- the stale nonzero value would pass that check, then Leg 1's own swap would fail its slippage floor against the real quote, burning the ~0.3 STX gas estimate on a guaranteed-to-fail transaction every time a profitable opportunity was detected. Fix computes min-alex-out as 1% below the same quote the scan already fetched, and broadcasts it as a separate transaction immediately before the flash-loan call, both signed by the same wallet -- confirmed live to be alex-arb-receiver-v5's actual contract-owner (SPR9PQAN...), so it has permission to call this. Restarted the background monitor with the fix; still dry-run by default, no live execution without an explicit EXECUTE=true decision. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Oct 10, 2026
This branch was successfully deployed
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.
Summary
`alex-arb-receiver-v5` requires `min-alex-out` set fresh before every call — it auto-resets to 0 after every successful execution, specifically to force re-calibration rather than silently reusing a stale slippage value. `monitor-alex-arb.mjs`'s `executeAlexArb` never called `set-min-alex-out` at all.
Checked the live on-chain state before fixing, not assumed: `min-alex-out` is currently `6,890,524,177,442`, a leftover value from some earlier setup with no relation to this script's current 10 STX test loan (which quotes ~697 ALEX, ~69.7 billion raw units — two orders of magnitude below the stale threshold). Flipping `EXECUTE=true` as the script stood would not have reverted cleanly at the `ERR-MIN-ALEX-UNSET` guard as expected — the stale nonzero value would pass that check, then Leg 1's own swap would fail its slippage floor against the real quote, burning the ~0.3 STX gas estimate on a guaranteed-to-fail transaction every time a profitable opportunity was actually detected.
Fix
Computes `min-alex-out` as 1% below the same quote the scan already fetched, and broadcasts it as a separate transaction immediately before the flash-loan call, both signed by the same wallet — confirmed live to be `alex-arb-receiver-v5`'s actual `contract-owner` (`SPR9PQAN...`), so it has permission to call this.
Not included
Restarted the background monitor with the fix; still dry-run by default. No live execution happened or was recommended without this fix landing first.
🤖 Generated with Claude Code