Architecture
PrivateERC20 (abstract)
├── inherits: Context, ERC165, IPrivateERC20, AccessControl, ReentrancyGuard
├── storage:
│ ├── _balances: per-account encrypted balance (MPC ciphertext + user ciphertext)
│ ├── _allowances: mapping(address => mapping(address => Allowance))
│ ├── _totalSupply: ctUint256 // always decrypts to real supply
│ └── _accountEncryptionAddress: mapping(address => address)
├── roles:
│ ├── DEFAULT_ADMIN_ROLE → deployer
│ └── MINTER_ROLE → bridges, vesting contracts, etc.
└── MpcCore (precompile at 0x64)
├── setPublic256(uint256) → gtUint256
├── validateCiphertext(itUint256) → gtUint256
├── transfer(gt, gt, gt) → (gt, gt, gtBool)
├── offBoard(gtUint256) → ctUint256
├── offBoardToUser(gtUint256, address) → ctUint256
└── onBoard(ctUint256) → gtUint256Key Concepts
Term
Description
Last updated
Was this helpful?