How It Works
The technical architecture behind DiscordCash.
Architecture
Entry and exit. Deposits and withdrawals hidden on-chain.
Bot runs inside a hardware enclave. Data is encrypted by the CPU. Nobody can read it.
Reactions and gift counts are public. Amounts are not.
Gift Flow
1. React with 💰 on a message. The bot transfers your default gift amount to the recipient instantly.
2. Done. The recipient gets a DM saying someone gifted them. No amount shown. They can check their balance with /balance.
Rain Flow
1. Start with /rain amount. The bot posts a message and deducts the amount from your balance.
2. React. Anyone who reacts with 🌧️ within 2 hours is included.
3. Split. After 2 hours the amount is split equally across all participants.
Deposit and Withdrawal
Deposit: /deposit gives you a shielded z-address. Send ZEC and your balance updates after 1 confirmation.
Withdrawal: /withdraw amount address sends ZEC to any Zcash address via the shielded pool.
Anonymous Gifts
/anongift @user generates a Zcash payment link. You send from your own wallet. The bot is not involved in the transaction at all.
Privacy Summary
| Data | Visibility |
|---|---|
| Who gifted whom | Visible Discord reaction is public |
| Gift amounts | Hidden Never shown publicly |
| User balances | Hidden Encrypted inside Phala TEE |
| On-chain transactions | Hidden Zcash shielded addresses |
| Anonymous gifts | Hidden Wallet to wallet, bot not involved |
Stack
Server: Python, discord.py, aiohttp, aiosqlite. Runs inside a Phala Cloud TEE (Intel TDX).
On-chain: Zcash shielded pool for deposits and withdrawals.
Privacy: Hardware-level encryption via Phala. Zcash shielded addresses for on-chain privacy.