◇ Threat model · controls · honest limits
The security model.
Five layers gate every fund-moving action. Below the controls, in the same type size, is what they deliberately do not cover.
What's enforced.
Numeric-ID allowlist
Commands run only for pre-registered Telegram user IDs — never @usernames, which can change hands. Set in config before the bot runs; there's no in-bot request-access path.
Argon2 password login
/login opens a 30-minute session. The password is Argon2-hashed and compared — never stored or logged in plaintext.
Single-use TOTP
Every fund-moving command needs a fresh 6-digit code, even mid-session. Burned on first use; replay tracking is global across all admins on the shared secret.
Isolated signer boundary
Chat handling and parsing never touch key material. Signing sits behind one Signer interface — local AES-256-GCM keystore now, KMS/HSM for mainnet.
Hash-chained audit log
Every attempt, allowed or denied, is appended with a hash folding in the prior entry. Tampering with any past line breaks verification for all lines after it.
Price-impact ceiling
On top of Jupiter's slippage enforcement, a route with too much up-front price impact is rejected before it's ever signed — even if it's within slippage tolerance.
If /login or an OTP-bearing command is typed into a group by mistake, the bot deletes the message (where it has permission) and burns any OTP in it immediately — rather than refusing to act and leaving the secret sitting in the transcript.
What it doesn't protect against.
| Scenario | Reality | What limits it |
|---|---|---|
| Live session hijack | A compromised, logged-in session holding a live OTP can authorize one fund-moving command. | Fresh OTP per action; burned on use — a captured code can't be replayed. |
| Host filesystem access | Someone with direct disk access can read/rewrite files. | Audit chain makes tampering detectable, not impossible. Keystore is encrypted at rest. |
| Telegram account takeover | This is custody software, not account-security software. | Rotate password + OTP secret immediately if your account is compromised. |
| Mainnet with local key | Not allowed. Local keystore is devnet/testnet only. | Config loader hard-refuses to start against mainnet-beta without a custody signer. |
An internal security review and an independent test pass have both run at this stage. Both found and fixed real issues. Independent third-party audit before mainnet remains pending.