DOCS / OVERVIEW / ARCHITECTURE

Architecture

Live on testnet

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.

ANY CARD → MAIN ACCOUNT · ONE CARD → ITS OWN WALLET

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

CONTRACTROLE
account
ROLEThe Main account: a flat set of cards, any one of which authorises (one of n). One instance per account.
pocket
ROLEA card's own wallet: obeys only that card's chip. No recovery path exists. One instance per card.
nfc-nft
ROLEThe card registry: links a card's public key to its token. One call registers a card, deploys its wallet and binds them.
pocket-factory
ROLEDeploys card wallets and answers which wallet belongs to a card.
collection
ROLEDeploys card registries (one per campaign) and indexes token ownership across them.
router
ROLERuns several calls all-or-nothing under one authorisation. No admin, no upgrade path, holds no funds.

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

  1. The card's secure chip holds its key pair (some cards generate it on the chip) and never reveals it.
  2. ChimpDAO registers the card on-chain: it receives its token and its own wallet, and becomes a genuine Chimp card.
  3. The owner activates it by creating an account, or adds it to an existing account.
  4. 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

WHATWHERE
Keys
WHEREIn the chip
Account rules and balances
WHEREOn Stellar
Your first name, card names and colours
WHEREOnly on your phone

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.

Edit this page in the repositoryCHIMPDAO DOCS · TESTNET