Concepts

ERC-7984 tokens

Obscura distributes ERC-7984 confidential tokens. Import any confidential ERC-7984 token you already hold by address.

Importing an ERC-7984 token

Obscura ships no default token: you import the confidential ERC-7984 token you already hold. When you import by address, Obscura validates it onchain by reading name, symbol, decimals, and confidentialTotalSupply. A plain ERC-20 (which has no confidential supply) is rejected as "Not an ERC-7984 confidential token." Tokens verified in Zama's Wrappers Registry are also listed for you.

Encrypted balances are 64-bit, so the ceiling is 2^64 - 1 raw units. Amounts above that overflow the ciphertext and are rejected on input.

Operators and approval

ERC-7984 uses operator approval instead of ERC-20 allowances. A distribution contract moves your tokens with confidentialTransferFrom, which reverts unless you have approved it as an operator:

Operator approval
setOperator(distributionContract, deadline)

Obscura sets the deadline far in the future (around the year 2096) so you approve once per token.

The ACL and decryption

Every encrypted value carries an access-control list. Without a grant, a wallet's decrypt fails. Balances are decrypted on demand with the SDK's allow then userDecrypt, which takes one EIP-712 signature per session and is silent afterward. See Confidentiality & FHEVM.

Units

Amounts are integers in the token's smallest unit. For a token with 6 decimals:

Units
// for a token with 6 decimalstoUnits(1.5)          // => 1_500_000nfromUnits(1_500_000n) // => "1.5"