Repository navigation
feat(agents): implement cross-market consistency arbitrage strategy (#108) - #191
Open
ryder777777 wants to merge 1 commit into
Open
ryder777777 wants to merge 1 commit into
ryder777777 wants to merge 1 commit into
Conversation
ryder777777
force-pushed
the
feat/issue-108-cross-market-arbitrage
branch
2 times, most recently
from
October 23, 2026 21:32
148d902 to
31e946e
Compare
ryder777777
force-pushed
the
feat/issue-108-cross-market-arbitrage
branch
from
October 23, 2026 21:33
31e946e to
fa6bee4
Compare
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.
What this does
Implements cross-market consistency arbitrage (
exhaustive_partition,mutually_exclusive, andmonotonic_chain) and adds the off-chaincalc_buyinverse (collateral_for_shares/collateralForShares) to bothmodel/fpmm_model.pyandagents/core/fpmm.ts.model/fpmm_model.py&agents/core/fpmm.ts: solve the constant-product quadratic for net collateral and refine across ceiling boundaries, verified by 1,000 random pool/target property checks.agents/core/arb/relations.ts: relation loader, validator, and automatic monotonic chain discovery across open price-threshold markets sharing(oracle, asset, comparison, closeTime).agents/core/arb/detect.ts&agents/core/arb/execute.ts&agents/bin/arb.ts: multi-leg FPMM trade sizing (sizeDutchBook), fresh pre-quote checks across all legs, shared trace recording, and reverse-orderagentSellV2unwind if a middle leg fails.Tested with
python3 model/fpmm_model.pyandcd agents && npm test && npm run build.Closes #108
Checklist
cargo fmt --check,cargo clippy --all-targets -- -D warnings, andcargo testpassHow this was tested
Verified unit test cases covering nominal thresholds, boundary conditions, and deterministic state transitions.