DOCS / OVERVIEW / ARCHITECTURE
Architecture
How a ChimpDAO account is organised. Accounts and card wallets are Soroban smart contracts; nothing is custodial; the cards' private keys live only inside their chips.
The three building blocks
NFC · SECURE CHIP
Card
An NFC card with a secure chip that holds its key. Some cards generate the key on the chip. The key never leaves the chip. The card signs, the phone never does.
SMART CONTRACT · C… ADDRESS
Main account
A smart-contract account (address starting with C). Any card of the account can authorise a payment from Main.
C… ADDRESS · "POCKET" IN CODE
Card's wallet
Each card also has its own wallet (a contract address starting with C). Only that exact card can spend from it. In the app this is shown as "Jungle's wallet". In the code it is called a Pocket.
Adding or replacing a card never changes the Main account's address or what it holds. A card's wallet travels with the card: its address is derived from the card's public key.
The contracts
Signature checking is linked into each contract that needs it rather than delegated to a separate verifier contract, so a card wallet depends on nothing but its own storage to check its card. IDs: see Testnet deployment.
Lifecycle of a card
- The card's secure chip holds its key pair (some cards generate it on the chip) and never reveals it.
- ChimpDAO registers the card on-chain: it receives its token and its own wallet, and becomes a genuine Chimp card.
- The owner activates it by creating an account, or adds it to an existing account.
- It can later be removed (lost or retired).
Code updates
Every card is enrolled with a wallet that keeps the code it was deployed with: ChimpDAO has no authority over that code. A card can opt in, with its own signature, to a shared code version that ChimpDAO updates for all opted-in wallets at once, and can leave it the same way. The router cannot be upgraded. A Main account's code can only be changed by one of its cards.
Who pays fees
Network fees are paid by ChimpDAO, through a fee-sponsoring service that only adds the fee signature: it cannot authorise a payment. The app checks that the transaction returned by this service is exactly the one it sent (same hash). Card registration is paid by ChimpDAO's admin.
What lives where
Nothing secret is stored by the app.
CHIMPY
Lose a card, lose what's on its own wallet. Money in Main stays safe as long as you have another card.

