[Unit] Description=usdt-bridge listen-all - USDT/wUSDT listener; auto-pays sub-cap swaps via the bounded automation-key allowance, everything else queues for 3-of-5 After=network-online.target Wants=network-online.target [Service] Type=simple User=usdtbridge Group=usdtbridge WorkingDirectory=/opt/usdtbridge/data ExecStart=/opt/usdtbridge/bin/usdt-bridge --config /opt/usdtbridge/bin/bridge_config.json listen-all Environment=RUST_LOG=info EnvironmentFile=/etc/pezbridgebot/telegram_token.env EnvironmentFile=-/etc/usdtbridge/automation_key.env Restart=on-failure RestartSec=10 # --- Hardening --- # Deployed 2026-07-14 on NEW-10 (89.116.25.180), same UTIL bucket as pezbridge-bot (no # consensus/fund-critical services here - see dks-ci-runners/vps2-dev-decommission-status # memory for the placement convention). UPDATED 2026-07-14: this process now also loads the # automation key's mnemonic (from a separate, tighter-scoped EnvironmentFile than the Telegram # token) and can sign+submit Assets.transfer_approved on both chains - but ONLY within the # multisig's pre-approved delegated allowance, capped per-tx (max_single_tx) and per rolling 24h # window (auto_pay_daily_cap) with a circuit breaker on burst consumption. It can never mint, # burn, set_team, or transfer_ownership - those stay exclusively multisig (3-of-5), same as # before. Worst case of this key being compromised is bounded by whatever allowance + daily cap # remain at the time, not unbounded custody - a materially different (and much smaller) risk # tier than the legacy single-key bot this whole migration replaced. Hardening kept as-is; the # automation_key.env file itself is root:usdtbridge 0640, separate from the Telegram token file # so a Telegram-token leak alone can never expose the signing key. The leading "-" on that # EnvironmentFile line is required (not decorative): the file does not exist until an operator # deliberately provisions it, and the unit must still start cleanly without it, matching the # code's own AUTOMATION_KEY_MNEMONIC-unset fallback (100% manual, auto-pay simply inactive). NoNewPrivileges=yes ProtectSystem=strict ProtectHome=yes PrivateTmp=yes PrivateDevices=yes ProtectKernelTunables=yes ProtectKernelModules=yes ProtectKernelLogs=yes ProtectControlGroups=yes ProtectClock=yes ProtectHostname=yes RestrictSUIDSGID=yes RemoveIPC=yes LockPersonality=yes RestrictRealtime=yes RestrictNamespaces=yes MemoryDenyWriteExecute=yes SystemCallFilter=@system-service SystemCallArchitectures=native CapabilityBoundingSet= AmbientCapabilities= ReadWritePaths=/opt/usdtbridge/data UMask=0077 [Install] WantedBy=multi-user.target