Expand executable protected opportunity search

This commit is contained in:
Theodore Song
2026-08-23 07:58:25 -04:00
parent 974a957f58
commit 53141d9071
6 changed files with 38 additions and 38 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ jobs:
- run: node scripts/run-autonomous-cycle.mjs
env:
ARENA_URL: https://polymarket-site-eta.vercel.app
EXPECTED_BUILD: "126"
EXPECTED_BUILD: "127"
RUNTIME_BRANCH: runtime-state
RUNTIME_STATE_PATH: runtime/state.json
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,4 +1,4 @@
name: Release duration-aware protected returns after Vercel quota reset
name: Release expanded executable search after Vercel quota reset
on:
schedule:
@@ -26,23 +26,23 @@ jobs:
env:
ARENA_URL: https://polymarket-site-eta.vercel.app
run: |
if curl --fail --silent --show-error "${ARENA_URL}/?duration_preflight=${GITHUB_RUN_ID}" | grep -q 'bundleMinimumDailyReturn'; then
echo "Duration-aware protected returns are already live."
if curl --fail --silent --show-error "${ARENA_URL}/?search_preflight=${GITHUB_RUN_ID}" | grep -q 'BUNDLE_DEPTH_CANDIDATE_LIMIT=200'; then
echo "Expanded executable search is already live."
exit 0
fi
printf 'Duration-aware protected return deployment retry from run %s at %s\n' "$GITHUB_RUN_ID" "$(date -u +%FT%TZ)" > .duration-aware-release-trigger
printf 'Expanded executable search deployment retry from run %s at %s\n' "$GITHUB_RUN_ID" "$(date -u +%FT%TZ)" > .expanded-search-release-trigger
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .duration-aware-release-trigger
git commit -m "Retry duration-aware protected returns deployment"
git add .expanded-search-release-trigger
git commit -m "Retry expanded executable search deployment"
git push origin HEAD:main
- name: Verify the exact sizing revision in production
- name: Verify the expanded search revision in production
env:
ARENA_URL: https://polymarket-site-eta.vercel.app
run: |
for attempt in $(seq 1 40); do
if curl --fail --silent --show-error "${ARENA_URL}/?duration_wait=${GITHUB_RUN_ID}-${attempt}" | grep -q 'bundleMinimumDailyReturn'; then
echo "Duration-aware protected returns are live."
if curl --fail --silent --show-error "${ARENA_URL}/?search_wait=${GITHUB_RUN_ID}-${attempt}" | grep -q 'BUNDLE_DEPTH_CANDIDATE_LIMIT=200'; then
echo "Expanded executable search is live."
exit 0
fi
sleep 30
+9 -9
View File
@@ -23,7 +23,7 @@ Offline cycles can apply calibration already earned from live observations, but
the evidence ledger is read-only: cached prices cannot grade pending signals,
expire horizons, or create new observations.
Build 126 targets five-minute slots with a serialized, self-chained GitHub Actions runtime.
Build 127 targets five-minute slots with a serialized, self-chained GitHub Actions runtime.
The mutable snapshot stays on the dedicated `runtime-state` branch, which is
explicitly excluded from Vercel Git deployments through
`git.deploymentEnabled`. This prevents high-frequency state commits from
@@ -70,7 +70,7 @@ Polymarket event key. Related Ethereum or Bitcoin contracts cannot create
several simultaneous copies of one move, and outcomes from the same underlying
three-hour shock window count as one learner event.
Each Build 126 cycle also scans the 1,000 most-active Polymarket events for
Each Build 127 cycle also scans the 1,000 most-active Polymarket events for
complete negative-risk bundles and logically nested threshold or deadline
pairs, plus same-market YES/NO complements whose equal shares have a fixed
$1 redemption value. Polymarket's documented complete-set merge converts equal
@@ -78,7 +78,7 @@ YES and NO amounts directly back into collateral, so a verified binary complemen
is merged and realized in the same paper cycle instead of waiting for resolution.
The official negative-risk adapter also converts a complete set of NO tokens into
`n - 1` units of collateral, less the event's `negRiskFeeBips`. Strategy 65 treats
that as a separate immediate path. The scanner reserves 20 of its 80 depth checks
that as a separate immediate path. The scanner reserves 40 of its 200 depth checks
for complete-NO candidates, then reads `getFeeBips` and `getQuestionCount` from the
official Polygon adapter for only those candidates. Every leg must expose one
consistent `negRiskMarketID`, the event leg count must equal the on-chain question
@@ -95,9 +95,9 @@ Gasless CTF operations include merge transactions; see
[Positions & Tokens](https://docs.polymarket.com/concepts/positions-tokens) and
[Gasless Transactions](https://docs.polymarket.com/trading/gasless).
Gamma's market-specific fee flag replaces the old blanket 0.5-cent fee
reserve for markets declared fee-free. The scanner keeps the existing 60
independent-first general structure checks and reserves 20 additional checks for
same-market complements. Structures are ranked by locked-capital efficiency, with
reserve for markets declared fee-free. The scanner uses 120 independent-first
general structure checks and reserves 40 additional checks for same-market
complements. Structures are ranked by locked-capital efficiency, with
the best structure from each independent event checked before alternates from events
already represented. They are repriced
from batched CLOB asks from the equal-unit size needed for at least a $50
@@ -131,7 +131,7 @@ The Suggestions view stores scan, depth, fee, actionable, and closest
executable-margin counts so an empty lane is evidence rather than an ambiguous
failure.
Build 126 retains the directional learner's exact-fee policy, which replaced the blanket half-cent cost with
Build 127 retains the directional learner's exact-fee policy, which replaced the blanket half-cent cost with
the market's Gamma fee schedule at both the entry and future checkpoint, plus a
separate half-cent round-trip slippage allowance. Fee-free markets pay only the
slippage allowance; an unavailable fee schedule gets a conservative four-cent
@@ -164,7 +164,7 @@ target fell to -44.14% in validation and remained negative in holdout, so it
cannot authorize capital. The reproducible result is stored in
`research/settlement-calibration-exact-fee-5000-audit.json`.
Build 126 retains Build 100's retirement of the old 3-6 day resolution-window
Build 127 retains Build 100's retirement of the old 3-6 day resolution-window
capital permission. That audit clustered confidence by event but still averaged
several correlated contracts inside each event, while production could choose
only one. The corrected replay chooses the highest-volume eligible contract per event and
@@ -284,7 +284,7 @@ evidence proves an edge.
Run `npm run evaluate:sports-favorites` for the retired pregame favorite audit.
Its 12-hour, 60%-75% cohort had positive point estimates but did not establish a
reliable confidence bound, so Build 126 no longer allocates capital to that rule.
reliable confidence bound, so Build 127 no longer allocates capital to that rule.
Strategy 65 also tracks the exact-fee settlement calibration's three-day Sports
NO cohort as a zero-capital forward lane. The corrected 5,000-market run
+10 -10
View File
@@ -341,7 +341,7 @@ footer{margin-top:34px;padding-top:22px;border-top:1px solid var(--border);color
<nav class="topnav">
<div class="brand">
<div class="logo">🏆</div>
<div><div class="brand-name">Polymarket Arena</div><div class="brand-sub">10 agents · 5 core + 5 aggressive</div><div class="build-badge">Adaptive strategy 65 · duration-aware protected returns · build 126</div></div>
<div><div class="brand-name">Polymarket Arena</div><div class="brand-sub">10 agents · 5 core + 5 aggressive</div><div class="build-badge">Adaptive strategy 65 · expanded executable search · build 127</div></div>
</div>
<div class="tabs" id="tabs">
<button class="tab" data-tab="overview">Overview</button>
@@ -363,7 +363,7 @@ footer{margin-top:34px;padding-top:22px;border-top:1px solid var(--border);color
<div class="personal-banner" id="personalBanner">
<b>Personal research mode.</b> This copy is for your own analysis, paper tracking, and manual trade research only. It does not pool money, onboard investors, custody funds, bypass eligibility rules, or place orders without your manual approval.
</div>
<div class="live-build-banner"><b>Build 126 active:</b> Strategy 65 keeps directional capital locked because its forward evidence remains negative after exact costs. Protected entries now adapt their hurdle to expected lock time: 0.03% per day through 7 days, 0.04% through 30, 0.05% through 90, and 0.075% beyond 90 days. Every entry also needs at least $0.50 of executable locked profit, exact depth and fees, and a 0.10c per-unit safety margin. Duration-aware 6-10% sizing remains inside the 12% event cap. Phones and computers display the same read-only autonomous state. Profits are not guaranteed.</div>
<div class="live-build-banner"><b>Build 127 active:</b> Strategy 65 now exact-depth-checks 200 protected structures per cycle instead of 80, while reserving 40 checks each for complete-NO conversions and binary complements. The larger search preserves every economic gate: duration-aware return hurdles, at least $0.50 of executable locked profit, exact depth and fees, a 0.10c per-unit safety margin, 6-10% sizing, and the 12% event cap. Directional capital remains locked while its forward evidence is negative after exact costs. Phones and computers display the same read-only autonomous state. Profits are not guaranteed.</div>
<!-- ============ OVERVIEW ============ -->
<section class="tabpanel" data-tab="overview">
@@ -745,7 +745,7 @@ footer{margin-top:34px;padding-top:22px;border-top:1px solid var(--border);color
</section>
<footer>
Build 126 · Adaptive strategy 65 · Exact-fee complete-NO conversion · Evidence-first bounded snapshots · Six-hour bounded probation with matched executable exits · Serialized self-chained five-minute slots with cron recovery · Oldest-first bounded learning transport · Restart-safe offline runtime · Exact-fee directional learning · Duration-aware, event-capped verified bundles · Scale-aware executable-profit floor · Atomic verified bundle-profit recycling · Conservative intact-bundle accounting · Contest-deduplicated sports shadow research · Corrected one-decision-per-event settlement audit · Autonomous runtime 2 · Offline runtime 3 · Maker research 3 · Agent learning 3 · Paper trading only · Live prices from Polymarket's public Gamma and CLOB APIs · Not financial advice ·
Build 127 · Adaptive strategy 65 · Expanded independent-event executable search · Exact-fee complete-NO conversion · Evidence-first bounded snapshots · Six-hour bounded probation with matched executable exits · Serialized self-chained five-minute slots with cron recovery · Oldest-first bounded learning transport · Restart-safe offline runtime · Exact-fee directional learning · Duration-aware, event-capped verified bundles · Scale-aware executable-profit floor · Atomic verified bundle-profit recycling · Conservative intact-bundle accounting · Contest-deduplicated sports shadow research · Corrected one-decision-per-event settlement audit · Autonomous runtime 2 · Offline runtime 3 · Maker research 3 · Agent learning 3 · Paper trading only · Live prices from Polymarket's public Gamma and CLOB APIs · Not financial advice ·
<a class="market-link" href="https://github.com/theodore-song/polymarket-analyst" target="_blank" rel="noopener">Source on GitHub</a>
</footer>
</div>
@@ -774,7 +774,7 @@ const POLITICS_TREND_MIN_HOLD_HOURS = 72;
const EXIT_CONFIRM_HOURS = 6;
const AGENTS_KEY = "pma_agents_v2";
const SUG_KEY = "pma_suggestions_v5";
const BUILD_VERSION = 126;
const BUILD_VERSION = 127;
const AGENT_LEARNING_VERSION = 3;
const SUGGESTION_ENGINE_VERSION = 65;
const MAKER_STRATEGY_VERSION = 3;
@@ -1783,9 +1783,9 @@ const NEG_RISK_MIN_LIQUIDITY=1000;
const NEG_RISK_MIN_NET_PROFIT=0.001;
const NEG_RISK_MIN_NET_RETURN=0.0015;
const BUNDLE_BOOK_BATCH_SIZE=200;
const BUNDLE_DEPTH_CANDIDATE_LIMIT=80;
const BINARY_COMPLEMENT_DEPTH_RESERVE=20;
const NEG_RISK_CONVERSION_DEPTH_RESERVE=20;
const BUNDLE_DEPTH_CANDIDATE_LIMIT=200;
const BINARY_COMPLEMENT_DEPTH_RESERVE=40;
const NEG_RISK_CONVERSION_DEPTH_RESERVE=40;
const NEG_RISK_POLYGON_RPC="https://polygon.drpc.org";
const NEG_RISK_ADAPTER_ADDRESS="0xd91E80cF2E7be2e162c6513ceD06f1dD0dA35296";
const NEG_RISK_FEE_BIPS_SELECTOR="0x2582cb5e";
@@ -7844,9 +7844,9 @@ function runEngineSelfTest(){
Object.assign({},dominanceSuggestion,{bundle_id:"dominance:event-b:a:b",bundle_event_id:"event-b",net_edge:0.02,days_to_resolution:5}),
],3);
const binaryReserveOrder=bundleVerificationShortlist([
...Array.from({length:90},(_,index)=>Object.assign({},dominanceSuggestion,{bundle_id:`dominance:general-${index}:a:b`,bundle_event_id:`general-${index}`,net_edge:0.10-index/1000,days_to_resolution:5})),
...Array.from({length:30},(_,index)=>Object.assign({},binaryComplementSuggestion,{bundle_id:`binary:reserved-${index}:market`,bundle_event_id:`reserved-${index}`,net_edge:-0.01-index/1000})),
...Array.from({length:30},(_,index)=>Object.assign({},convertibleNoBundleSuggestion,{bundle_id:`bundle:conversion-${index}:no`,bundle_event_id:`conversion-${index}`,net_edge:-0.02-index/1000})),
...Array.from({length:180},(_,index)=>Object.assign({},dominanceSuggestion,{bundle_id:`dominance:general-${index}:a:b`,bundle_event_id:`general-${index}`,net_edge:0.10-index/1000,days_to_resolution:5})),
...Array.from({length:60},(_,index)=>Object.assign({},binaryComplementSuggestion,{bundle_id:`binary:reserved-${index}:market`,bundle_event_id:`reserved-${index}`,net_edge:-0.01-index/1000})),
...Array.from({length:60},(_,index)=>Object.assign({},convertibleNoBundleSuggestion,{bundle_id:`bundle:conversion-${index}:no`,bundle_event_id:`conversion-${index}`,net_edge:-0.02-index/1000})),
]);
const eventCapBook=defaultPortfolio();
eventCapBook.cash=8800;
+8 -8
View File
@@ -16,13 +16,13 @@ const settlementCalibrationAudit = JSON.parse(fs.readFileSync(new URL("../resear
const sportsEvaluator = fs.readFileSync(new URL("./evaluate-sports-favorites.mjs", import.meta.url), "utf8");
const build = Number(index.match(/const BUILD_VERSION = (\d+);/)?.[1]);
assert.equal(build, 126);
assert.equal(build, 127);
assert.equal(vercelConfig.git?.deploymentEnabled?.["runtime-state"], false);
assert.equal(settlementCalibrationAudit.requested_markets, 5000);
assert.equal(settlementCalibrationAudit.train_passed, 0);
assert.equal(settlementCalibrationAudit.validation_selected, 0);
assert.equal(settlementCalibrationAudit.holdout_passed, 0);
assert.match(index, /Adaptive strategy 65 · duration-aware protected returns · build 126/);
assert.match(index, /Adaptive strategy 65 · expanded executable search · build 127/);
assert.deepEqual([...ALLOWED_RUNTIME_KEYS].sort(), ["pma_agents_v2", "pma_suggestions_v5"]);
assert.match(index, /function collectPublicRuntimeItems\(\)/);
assert.match(index, /const PUBLIC_RUNTIME_KEYS=Object\.freeze\(\[AGENTS_KEY,SUG_KEY\]\)/);
@@ -72,10 +72,10 @@ assert.match(api, /Buffer\.from\(file\.content/);
assert.match(api, /searchParams\.set\("runtime", `\$\{Date\.now\(\)\}/);
assert.match(workflow, /cron: "2,7,12,17,22,27,32,37,42,47,52,57 \* \* \* \*"/);
assert.match(workflow, /contents: write/);
assert.match(workflow, /EXPECTED_BUILD: "126"/);
assert.match(workflow, /EXPECTED_BUILD: "127"/);
assert.equal((workflow.match(/if: always\(\)/g) || []).length, 2);
assert.match(routingReleaseWorkflow, /name: Release duration-aware protected returns after Vercel quota reset/);
assert.match(routingReleaseWorkflow, /bundleMinimumDailyReturn/);
assert.match(routingReleaseWorkflow, /name: Release expanded executable search after Vercel quota reset/);
assert.match(routingReleaseWorkflow, /BUNDLE_DEPTH_CANDIDATE_LIMIT=200/);
assert.match(routingReleaseWorkflow, /cron: "25 1-23\/2 23 8 \*"/);
assert.match(workflow, /actions: write/);
assert.match(workflow, /cancel-in-progress: false/);
@@ -89,9 +89,9 @@ assert.match(index, /bundleOpportunityTelemetry:true/);
assert.match(index, /function completeBundleSecuredProfit\(p\)/);
assert.match(index, /label:"Secured bundle profit"/);
assert.match(index, /additional settlement profit is secured by intact verified bundles/);
assert.match(index, /const BUNDLE_DEPTH_CANDIDATE_LIMIT=80;/);
assert.match(index, /const BINARY_COMPLEMENT_DEPTH_RESERVE=20;/);
assert.match(index, /const NEG_RISK_CONVERSION_DEPTH_RESERVE=20;/);
assert.match(index, /const BUNDLE_DEPTH_CANDIDATE_LIMIT=200;/);
assert.match(index, /const BINARY_COMPLEMENT_DEPTH_RESERVE=40;/);
assert.match(index, /const NEG_RISK_CONVERSION_DEPTH_RESERVE=40;/);
assert.match(index, /bundleRequiresDepthVerification:true/);
assert.match(index, /bundleRequiresClobFeeVerification:true/);
assert.match(index, /function bundleExecutableLeg\(book,units,feeSchedule\)/);
+1 -1
View File
@@ -1,4 +1,4 @@
const CACHE_NAME = "polymarket-arena-build-126";
const CACHE_NAME = "polymarket-arena-build-127";
const APP_SHELL = ["/", "/index.html", "/personal.html", "/cycle-worker.js"];
self.addEventListener("install", event => {