mirror of
https://github.com/iamlukethedev/Claw3D.git
synced 2026-08-14 09:02:38 +00:00
3.4 KiB
3.4 KiB
Crypto Launch Production Notes
This document covers the additional setup required to run the Pump.fun token launch flow safely in production.
Modes
user_approved
- The browser prepares the Pump.fun transaction.
- Phantom signs the transaction locally.
- The server only receives the signed transaction for submission.
server_side
- The frontend must expose
NEXT_PUBLIC_CRYPTO_LAUNCH_SERVER_MODE_ENABLED=true. - The server must expose
CRYPTO_LAUNCH_SERVER_MODE_ENABLED=true. - An operator must authenticate in the Launch tab before server-side launch APIs are allowed.
- The server signer comes from
PUMPFUN_SERVER_SECRET_KEY.
Required Environment Variables
For wallet-approved launches:
NEXT_PUBLIC_SOLANA_RPC_URLorHELIUS_MAINNET_RPC_URL/HELIUS_DEVNET_RPC_URL
For server-side launches:
NEXT_PUBLIC_CRYPTO_LAUNCH_SERVER_MODE_ENABLED=trueCRYPTO_LAUNCH_SERVER_MODE_ENABLED=truePUMPFUN_SERVER_SECRET_KEYCRYPTO_LAUNCH_OPERATOR_PASSWORDCRYPTO_LAUNCH_SESSION_SECRET
Recommendations:
- Use a dedicated launch wallet with explicit funding limits.
- Generate
CRYPTO_LAUNCH_SESSION_SECRETfrom a long random value, for exampleopenssl rand -hex 32. - Rotate
CRYPTO_LAUNCH_OPERATOR_PASSWORDandCRYPTO_LAUNCH_SESSION_SECRETtogether if operator access is ever in doubt.
Persistence
Prepared launches and audit logs are stored under the Claw3D/OpenClaw state directory:
~/.openclaw/claw3d/crypto-launch/prepared-launches.json~/.openclaw/claw3d/crypto-launch/launch-audit.jsonl
If you override OPENCLAW_STATE_DIR, these files move under that directory instead.
Operational expectations:
- Persist this directory on durable storage if the deployment is containerized.
- Treat the audit log as operational data and ship it to centralized log storage when possible.
- Keep file permissions restricted to the app user because prepared launches include serialized transactions and launch metadata.
Security Controls
The launch flow now includes:
- durable prepared-launch storage instead of process memory only.
- one-time submit tokens for prepared launch submission.
- HTTP-only signed operator sessions for server-side mode.
- per-IP request throttling on prepare and submit routes.
- HTTPS-only remote logo fetches.
- DNS and private-network checks to reduce SSRF risk during logo ingestion.
- logo size and content-type validation.
Deployment Checklist
- Set production Solana RPC endpoints.
- Decide whether server-side launches should be enabled at all.
- If server-side launches are enabled, configure the five launch env vars above.
- Persist
OPENCLAW_STATE_DIRacross restarts. - Restrict access to the Claw3D deployment with
STUDIO_ACCESS_TOKENor an equivalent reverse-proxy/auth layer. - Monitor
launch-audit.jsonlfor failed launches, rate limiting, and unauthorized server-side attempts. - Test both
devnetandmainnetflows before allowing operators to use the production signer.
Remaining Gaps
This is materially safer than the prototype flow, but it is not a replacement for full user accounts, RBAC, or centralized secrets management.
If you need multi-user production readiness, the next layer should be:
- real user identity instead of a shared operator password.
- role-based authorization for server-side launches.
- external secret storage for the server signer.
- centralized metrics/logging for launch attempts and outcomes.