Add dry-run GoodChain arbitrage bot scaffold#2
Open
kc-zero-lab wants to merge 1 commit into
Open
Conversation
yoniassia
pushed a commit
that referenced
this pull request
May 24, 2026
`docs/ETORO_GOODCHAIN_ADAPTER.md` documented three behaviors that the code stopped doing in iteration #2: - `ETORO_MODE` "unknown values fall back to mock" — actually throws `InvalidModeError` (task #0003). - Notional "falling back to amount (USD-stake)" — actually throws `MissingNotionalError` (task #2). - `loadInstrumentOverrides()` "unknown symbols are dropped" — actually throws `InvalidInstrumentOverridesError` (task #0006). The doc has been rewritten to describe the loud-failure contract honestly, and a new "Error taxonomy" section enumerates every typed error the SDK can raise (8 total, mirroring `index.ts` re-exports) with the module + constructor responsible. Operators can now grep this one section to map a thrown error back to its source. Docs-only change. Full etoro-client suite stays green. The three forbidden phrases from the PRD's verification step now return zero grep hits. Co-authored-by: Cursor <cursoragent@cursor.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.
Summary
Adds an isolated, dry-run-first GoodChain arbitrage bot scaffold under
backend/arb-bot.This is intended as a local operator/developer tool for:
Market-making / arbitrage logic
The bot is designed as a conservative cross-market market maker for the GoodChain app suite. Each venue adapter emits normalized
MarketQuoteobjects, then the opportunity engine compares them under common risk limits.Initial strategy families:
Spot ↔ spot cross-venue arbitrage
Spot ↔ perp basis market making
Prediction-market basket arbitrage
The key design choice is quote normalization + risk-gated execution, not hardcoded trading scripts. Live execution remains blocked unless every leg includes explicit transaction target/calldata.
Safety model
DRY_RUN=true.to+calldata.https://rpc.goodclaw.org42069https://goodswap.goodclaw.org/api/statusVerification
From
backend/arb-bot:npm run check✅npm run build✅I also attempted
npm run health, but the current environment timed out connecting torpc.goodclaw.org; the code path previously passed against the same endpoint before the timeout and remains covered by typecheck/build here.Follow-up work
markets.example.jsonwith concrete GoodSwap / GoodPerps / GoodPredict contracts or quote APIs.