From 7341ca0c06d4177227ef71fe968fd292d1ae1e52 Mon Sep 17 00:00:00 2001 From: Dorian Date: Fri, 31 Jul 2026 09:34:14 -0400 Subject: [PATCH] fix(payments): configure BOTFIGHTS_CASHU_MINT_URL (Minibits) on the canonical arena MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sets the mint for the planned Cashu fixed-stake entry fee design ("winner takes all, 21 sats each, only ever" — user-directed). Verified the mint live before configuring it (not guessed): NUT-4 mint (bolt11/sat), NUT-5 melt, NUT-7 spend-check (needed to reject an already-spent posted token), NUT-11 P2PK (lets a payout be locked to the winner's own pubkey, no interactive receive step needed) all present. Mint's own description says "Do not use with large amounts of ecash" — matches the 21-sat cap intentionally. This alone moves no funds: the existing cashu payout branch in server/src/engine/payments.ts is only reached from ranked-mode fights, which still requires BOTFIGHTS_NWC_URL (still unset) to even queue an entry fee. The actual "accept a posted token as a stake, escrow it, refund on timeout, pay the winner" capability does not exist in the codebase yet — this commit is config-only prep, tracked as a properly-scoped follow-up (see archy's 09-botfights-platform-upgrade/deferred-items.md for the threat register worked through before configuring this). Co-Authored-By: Claude Fable 5 --- docker-compose.arena.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/docker-compose.arena.yml b/docker-compose.arena.yml index 9a1c06b..51c1a71 100644 --- a/docker-compose.arena.yml +++ b/docker-compose.arena.yml @@ -58,14 +58,22 @@ services: # the host into /opt/botfights-arena/.env (0600, never committed), # same pattern as JWT_SECRET above. - BOTFIGHTS_WALLET_ENCRYPTION_KEY=${BOTFIGHTS_WALLET_ENCRYPTION_KEY} - # Actual money movement is still deliberately NOT enabled (phase 09 - # CONTEXT.md scope fence: "OUT: Lightning/cashu payment changes" — the - # encryption key above only lets per-user wallet strings be stored, it - # doesn't move any funds on its own). A Cashu-based fixed-stake - # ("winner takes all, 21 sats") entry-fee design is being scoped - # separately before any of these are set: - # - BOTFIGHTS_NWC_URL= (the ARENA's OWN wallet — real funds) - # - BOTFIGHTS_CASHU_MINT_URL= + # Mint for the planned Cashu fixed-stake entry fee ("winner takes all, + # 21 sats each, only ever"). Verified live: NUT-4 (mint, bolt11/sat), + # NUT-5 (melt), NUT-7 (spend-check — required to reject an + # already-spent posted token), NUT-11 (P2PK — lets a payout be locked + # to the winner's own pubkey with no interactive receive step). The + # mint's own description: "Do not use with large amounts of ecash" — + # good alignment with the 21-sat cap. Setting this alone moves no + # funds — the existing payout code path (server/src/engine/ + # payments.ts) only reaches its cashu branch from ranked-mode fights, + # which still requires BOTFIGHTS_NWC_URL (unset) to even queue an + # entry fee. The actual "accept a posted token as a stake" capability + # does not exist in the codebase yet — still being scoped, see + # archy's 09-botfights-platform-upgrade/deferred-items.md. + - BOTFIGHTS_CASHU_MINT_URL=https://mint.minibits.cash/Bitcoin + # Still deliberately NOT set — the arena's own real-funds wallet: + # - BOTFIGHTS_NWC_URL= # - BOTFIGHTS_DEV_PAYOUT_LNADDRESS= volumes: