ZKSDK Pools
Private liquidity pools built on ZKSDK's Privacy Coprocessor.
ZKSDK Pools lets teams create private liquidity pools where balances and transfers stay encrypted, while the chain only sees a CID pointer to encrypted state.
What it is
- A UI + API to create and manage private liquidity pools
- Built on Private Token Slots (FHE)
- Same infrastructure an external developer would use
Components
On-chain:
- Pool vault contract/program (holds pool config + CID)
- Coprocessor contract/program (receives results and updates vault)
Off-chain:
- Oracle listener (watches vault events)
- TFHE worker (Zama) (runs encrypted circuits)
- Encrypted storage (stores slot state by CID)
The coprocessor is the on-chain contract/program plus the off-chain operator (listener + worker) that executes the encrypted compute.
End-to-end flow
Deposit
- User app encrypts a deposit request locally (keys stay with the user).
- User submits deposit to the vault.
- Vault emits an event with the current CID.
- Listener calls the worker at
POST /api/v1/execute. - Worker updates encrypted slots, stores the new blob, returns a new CID.
- Listener submits the result to the coprocessor contract/program.
- Coprocessor updates the vault's CID.
Transfer
- User app encrypts a transfer request (sender slot, receiver slot, amount).
- Vault emits an event; listener triggers the worker.
- Worker runs the transfer circuit so all slots are touched.
- New encrypted blob is stored; new CID is returned and saved on-chain.
Withdraw
- User app encrypts a withdraw request.
- Vault emits an event; listener triggers the worker.
- Worker validates and updates encrypted slots.
- Coprocessor updates the vault CID and releases tokens on-chain.
Decrypt (view balance)
- User app reads the CID from the vault.
- User downloads the encrypted blob from storage.
- User decrypts locally with their secret key.
What is public vs private
Public:
- Pool totals
- Current CID
- Transaction metadata
Private:
- Slot ownership
- Slot balances
- Transfer amounts
API surface (same as coprocessor)
GET /api/v1/health- worker healthPOST /api/v1/execute- run encrypted circuits- Storage by CID (see Storage)