floor_pin: manual floors survive the daily p80 sync (Kruto stays 80)

The 08:00 daily sync_floors.py unconditionally overwrote every paper-book
floor with the trusted p80 — silently reverting Kruto 80→125.61 the morning
after the deliberate lowering, so the paper book stopped matching the live
book (which reads a different config) and the 'catch more Kruto flow'
experiment ran on real money only. sync_floors now honors a per-wallet
floor_pin; Kruto pinned to 80 in paper + backtest (live already 80 via
per_wallet_min_usd). All three books gate Kruto at 80 again.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jaxperro
2026-07-13 13:10:11 -04:00
parent d3db785925
commit 5ac5396c7a
3 changed files with 16 additions and 2 deletions
+2 -1
View File
@@ -19,7 +19,8 @@
"wallet": "0xe8ca3f758c93f44f3ec210542ab78afb7c0bcccb",
"name": "Kruto2027",
"class": "volume",
"floor": 80.0
"floor": 80.0,
"floor_pin": 80.0
},
{
"wallet": "0xbadaf319415c17f28824a43ae0cd912b9d84d874",
+2 -1
View File
@@ -7,7 +7,8 @@
"wallet": "0xe8ca3f758c93f44f3ec210542ab78afb7c0bcccb",
"name": "Kruto2027",
"class": "volume",
"floor": 125.61
"floor": 80.0,
"floor_pin": 80.0
},
{
"wallet": "0xbadaf319415c17f28824a43ae0cd912b9d84d874",
+12
View File
@@ -54,6 +54,18 @@ def main():
now = int(time.time())
changed = []
for w in ws:
# MANUAL OVERRIDE (2026-07-13): a wallet with `floor_pin` keeps that
# floor across daily runs — otherwise this clobbered a deliberate
# lowering back to p80 every 08:00 (Kruto2027 80→125.61 silently, so
# the paper book stopped matching the live book's floor). Mirror the
# same pin in backtest.json to keep all three books comparable.
pin = w.get("floor_pin")
if pin is not None:
if w.get("floor") != round(float(pin), 2):
changed.append((w.get("name", w["wallet"][:8]), w.get("floor"),
round(float(pin), 2)))
w["floor"] = round(float(pin), 2)
continue
p80 = trusted_p80(w["wallet"], now)
if p80 == float("inf"):
continue # no trusted sized bets — leave as-is