Zama 백서

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 75쪽 중 18쪽

s.zama.org/protocol/solidity-guides/smart-contract/acl) * [Zama SDK — encrypt & decrypt](https://docs.zama.org/protocol/sdk/guides/encrypt-decrypt) * [OpenZeppelin — Access Control](https://docs.openzeppelin.com/contracts/5.x/access-control) * [OpenZeppelin — Writing upgradeable contracts](https://docs.openzeppelin.com/upgrades-plugins/writing-upgradeable) # Governance # Governance overview Governance in the Zama protocol covers operation and adjustment of the protocol, including the $ZAMA token. Governance is decentralized and controlled by a set of operators that all have the same voting weight, independent of their staking amounts. The set of operators is itself changed by a governance proposal. ## Contract information | Resource | Link | | ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | Deployed addresses | [Addresses directory](/protocol/protocol-apps/addresses) | | `GovernanceOAppSender` source | [GovernanceOAppSender.sol](https://github.com/zama-ai/fhevm/blob/main/protocol-contracts/contracts/governance/contracts/GovernanceOAppSender.sol) | | `GovernanceOAppReceiver` source | [GovernanceOAppReceiver.sol](https://github.com/zama-ai/fhevm/blob/main/protocol-contracts/contracts/governance/contracts/GovernanceOAppReceiver.sol) | ## Structure The primary governance module is the Zama Protocol Aragon DAO on Ethereum controlled by the operators. This means that proposals are voted onchain and (most of them) automatically executed. There are furthermore secondary governance modules, in the form of local multisigs, deployed on every other chain involved in the protocol or token. They act as the owner of contracts on the given chain, and will be linked together with the primary governance module via LayerZero using the [`GovernanceOAppSender`](https://github.com/zama-ai/fhevm/blob/main/protocol-contracts/contracts/governance/contracts/GovernanceOAppSender.sol) and [`GovernanceOAppReceiver`](https://github.com/zama-ai/fhevm/blob/main/protocol-contracts/contracts/governance/contracts/GovernanceOAppReceiver.sol) contracts, allowing the latter to act on behalf of all of the secondary modules. This means that the Aragon DAO will be used for all governance under normal circumstances, and the local multisigs will only used as fallbacks in case there is an issue with the LayerZero link. On Ethereum, the Protocol DAO controls a Governance OApp Sender which communicates with a Governance OApp Receiver on the Gateway via LayerZero. The receiver acts through an Admin Module that is a trusted module of the Gateway multisig. ```mermaid flowchart subgraph Operators GOV-ETH-1..n end subgraph Ethereum Gov-Multisig Protocol-DAO GovernanceOAppSender Gov-Multisig -- admin role --> Protocol-DAO Protocol-DAO -- owner + delegate --> GovernanceOAppSender end GOV-ETH-1..n -. member .-> Gov-Multisig subgraph Gateway GovernanceOAppReceiver AdminModule Gateway-Multisig GovernanceOAppReceiver -- admin role --> AdminModule AdminModule -. trusted module .-> Gateway-Multisig Gateway-Multisig -- owner + delegate --> GovernanceOAppReceiver end GovernanceOAppSender -. controls (via LayerZero) .-> GovernanceOAppReceiver ``` > On BSC, HyperEVM, and Solana, the governance is controlled by a dedicated multisig contract. ```mermaid flowchart subgraph BSC BNB-Multisig end subgraph HyperEVM HyperEVM-Multisig end subgraph Solana Solana-Multisig end ``` An example of governance architecture for the token and its OFT contracts can be found in the [zama-token.md](/protocol/protocol-apps/zama-token) file. ## Operator wallets Each operator maintains their own wallets for participating in the DAO and multisigs. Operators are free to choose how they instantiate their wallet but are strongly encouraged to use a hardware, MPC, or multisig wallet. Where possible, the same wallet may be used for multiple multisigs. Linking operator identity to their wallets will eventually be handled onchain, but it for the moment is done via a secured GitHub repository. ## Proposals Anyone may create governance proposals. Once a proposal is created, every operator is expected to review it shortly afterwards, and act within the deadline set in the proposal. Verifying a proposal must be done independently and against information in the secured GitHub repository. Proposals will typically include actions for calling other contracts, and operators must independently verify these as well. When proposals are accepted, anyone can execute them through the Aragon App. ## Actions Below is an expected list of actions that will be taken by governance. For technical reasons we initially only use a single majority threshold (i.e. at least 1/2 of the operators), but we will be expanding with more soon for finer grained control. This is noted as "Initial threshold" and "Future threshold" in the table below. The following subsections gives details on each action. Note that [pausing](/protocol/protocol-apps/governance/pausing) is handled separately, and any operator can do this on their own. | Action | Initial threshold | Future threshold | Execution | | -------------------------------- | ----------------- | ---------------- | --------- | | Update contracts | 1/2 | 2/3 | Onchain | | Update offchain services | 1/2 | 2/3 | Depends | | Elect operators | 1/2 | 1/2 | Onchain | | Slash operators | 1/2 | 2/3 | Onchain | | Update the reward rate | 1/2 | 1/2 | Onchain | | Update unstaking cooldown period | 1/2 | 2/3 | Onchain | | Unpausing | 1/2 | 1/2 | Onchain | | Address / contract blocking | 1/2 | 1/6 | Onchain | | Address / contract unblocking | 1/2 | 1/2 | Onchain | | LayerZero re-configuration | 1/2 | 2/3 | Onchain | | Update cryptographic parameters | 1/2 | 2/3 | None | | Resharing the FHE key | 1/2 | 1/6 | Onchain | | Generating new FHE key | 1/2 | 2/3 | Onchain | Note that *Update offchain services* proposal may include some onchain actions to be executed, but may also simply be a consensus proposal on e.g. which version of an offchain service to use. ### Update contracts Once a new contract implementation is deployed, a governance proposal is made to update the protocol to use it (i.e. updating proxies). Operators must verify that the new implementation matches the specified release version. {% hint style="danger" %} **Some contracts cannot be upgraded**: $ZAMA token, operator staking contracts, pauser contracts {% endhint %} ### Update offchain services Some components allow version verification while other do not. When possible, these proposals will included the needed actions to verify versions of offchain services. In all cases must the operator verify that the version matches with the one discussed offchain. ### Elect operators The set of operators is negotiated offchain, and made effective with a governance proposal. Operators must verify that the proposal updates all the relevant contracts and with the correct set of operator addresses. ### Slash operators In the rare event than an operator is deviating from the desired behavior of the protocol, a governance proposal can be made to slash (part of) the stake of the operator. Details will be discussed offchain, resulting in a slashing amount. Operators must verify that the correct amount is used, and approve the proposal if they agree with the offense. ### Update the reward rate The tokens per second rate is used by [protocol staking](/protocol/protocol-apps/staking) to mint rewards and fees. The value is negotiated offchain, and operator must verify that the correct value is used. ### Update unstaking cooldown period Determines the unstaking delay for operators and token holders. The value is negotiated offchain, and operator must verify that the correct value is used. Low values risk making slashing less effective, and gives less time to find replacement operators if needed. Note that operator staking shares are transferable, so token holders have alternative means of “unstaking”. ### Unpausing Used to unpause the protocol after it has been [paused](/protocol/protocol-apps/governance/pausing). Negotiation of when it’s safe to unpause happens offchain by the incident team. Operators must be confident that it is safe to unpause before approving. ### Address / contract blocking An address can be blocked on host chains if needed. The reasons for this will be discussed on Slack first, and a proposal created to execute. ### Address / contract unblocking An address can be unblocked on host chains if needed. The reasons for this will be discussed on Slack first, and a proposal created to execute. ### LayerZero re-configuration In rare cases, we may need to adjust the LayerZero configuration. Details of this will be discussed offchain, including the responsibility of operators. Operators must make sure to understand implication of changes before approving. ### Update cryptographic parameters Occasionally, we may need to update the cryptographic parameters of the protocol, including for the FHE scheme or the MPC threshold protocol. This includes tweaks that improves security and performance. Proposals will likely not include onchain actions, but rather serve as a consensus point, with follow-up software updates. ### Resharing the FHE key The shares of the FHE secret key may need to be updated once in a while. Approval will trigger a Gateway request to the KMS nodes to execute a resharing. ### Generating new FHE key The FHE key may need to be renewed once in a while. Approval will trigger a Gateway request to the KMS nodes to re-execute key generation. # Pausing Circuit breakers are deployed on all chains involved with the Zama protocol. Any operator can trigger any of these on their own to pause parts of the protocol, but a governance vote is needed to unpause again. ## Contract information | Resource | Link | | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | | Deployed addresses | [Addresses directory](/protocol/protocol-apps/addresses) | | Source code | [PauserSetWrapper.sol](https://github.com/zama-ai/fhevm/blob/main/protocol-contracts/contracts/pauserSetWrapper/contracts/PauserSetWrapper.sol) | ## Structure ```mermaid flowchart subgraph Ethereum Protocol-DAO PauserSet-Host ACL-Host PauserSet-Wrapper ZAMA-ERC20 end subgraph Gateway Gateway-Multisig PauserSet-Gateway GatewayConfig end Protocol-DAO -- owner (via ACL contract) --> PauserSet-Host Pauser-1..n -. member .-> PauserSet-Host PauserSet-Host -. defines pausers .-> ACL-Host PauserSet-Host -. defines pausers .-> PauserSet-Wrapper PauserSet-Wrapper -- pauser role --> ZAMA-ERC20 Gateway-Multisig -- owner (via GatewayConfig contract) --> PauserSet-Gateway Pauser-1..n -. member .-> PauserSet-Gateway PauserSet-Gateway -. defines pausers .-> GatewayConfig ``` ## Wallets Each operator has their own wallet that can be used to trigger the circuit breakers. This address presents a trade-off between being readily available, for instance to anyone who’s on-call, while also being able to potentially cause significant damage if misused. Operators are free to choose their implementation, but we suggest to use a hot wallet kept as a secret in their deployment system. ## Targets The following components can be paused. | Component | Functionality | | ----------- | ----------------------------------------- | | $ZAMA token | Minting can be paused | | Ethereum | ACL updates can be paused | | Gateway | Decryption requests can be paused | | Gateway | Input verification requests can be paused | # Chains This page lists the chains involved in the Zama protocol, their block explorers, RPC endpoints, chain IDs, and LayerZero configurations. ## Mainnet ### Block explorers * Ethereum: <https://eth.blockscout.com/> * Polygon: <https://polygon.blockscout.com/> * Gateway: <https://explorer.mainnet.zama.org/> * BSC: <https://bscscan.com/> * HyperEVM: <https://hyperevmscan.io/> * Solana: <https://solscan.io/> ### RPC endpoints * Gateway: <https://rpc.mainnet.zama.org> ### EVM chains - Chain IDs Not to be confused with Endpoint IDs (see section below). | Name | Chain ID | | ---------- | -------- | | `Ethereum` | 1 | | `Polygon` | 137 | | `Gateway` | 261131 | | `BSC` | 56 | | `HyperEVM` | 999 | **Note:** These are only for EVM chains, Solana does not have a chain ID (but has a LayerZero endpoint ID). ### LayerZero #### Endpoint IDs Those are LayerZero specific and should not be confused with Chain IDs (see section above). | Name | Endpoint ID (eid) | | ---------- | ----------------- | | `Ethereum` | 30101 | | `Polygon` | 30109 | | `Gateway` | 30397 | | `BSC` | 30102 | | `SOL` | 30168 | | `HyperEVM` | 30367 | ## Testnet ### Block explorers * Ethereum Sepolia: <https://eth-sepolia.blockscout.com> * Gateway Testnet: <https://explorer.testnet.zama.org/> * Polygon Amoy: <https://amoy.polygonscan.com/> ### RPC endpoints * Gateway Testnet: <https://rpc.testnet.zama.org> ### EVM chains - Chain IDs | Name | Chain ID | | ------------------ | -------- | | `Ethereum Sepolia` | 11155111 | | `Gateway Testnet` | 10901 | | `BSC Testnet` | 97 | | `Polygon Amoy` | 80002 | ### LayerZero #### Endpoint IDs | Name | Endpoint ID (eid) | | ------------------ | ----------------- | | `Ethereum Sepolia` | 40161 | | `Gateway Testnet` | 40424 | | `BSC Testnet` | 40102 | | `Polygon Amoy` | 40267 | # Contract addresses This directory contains all deployed contract addresses for the Zama protocol, organized by chain. ## Mainnet * [Ethereum Mainnet](/protocol/protocol-apps/addresses/mainnet/ethereum) * [Polygon Mainnet](/protocol/protocol-apps/addresses/mainnet/polygon) * [Zama Gateway Mainnet](/protocol/protocol-apps/addresses/mainnet/gateway) * [Binance Smart Chain Mainnet](/protocol/protocol-apps/addresses/mainnet/bsc) * [HyperEVM Mainnet](/protocol/protocol-apps/addresses/mainnet/hyper_evm) * [Solana Mainnet](/protocol/protocol-apps/addresses/mainnet/solana) ## Testnet * [Sepolia Testnet](/protocol/protocol-apps/addresses/testnet/sepolia) * [Hoodi Testnet](/protocol/protocol-apps/addresses/testnet/hoodi) * [Zama Gateway Testnet](/protocol/protocol-apps/addresses/testnet/gateway) * [Polygon Amoy Testnet](/protocol/protocol-apps/addresses/testnet/amoy) # Mainnet # Ethereum ## Token | Name | Address | | ---------------- | ----------------------------------------------------------------------------------------------------------------------------- | | Zama Token | [`0xA12CC123ba206d4031D1c7f6223D1C2Ec249f4f3`](https://eth.blockscout.com/address/0xA12CC123ba206d4031D1c7f6223D1C2Ec249f4f3) | | Zama OFT Adapter | [`0xa798B04149e7a61cc95B7D114AD420e8969eA268`](https://eth.blockscout.com/address/0xa798B04149e7a61cc95B7D114AD420e8969eA268) | ## Confidential tokens ### Wrappers registry | Name | Address | | ----------------- | ----------------------------------------------------------------------------------------------------------------------------- | | Wrappers Registry | [`0xeb5015fF021DB115aCe010f23F55C2591059bBA0`](https://eth.blockscout.com/address/0xeb5015fF021DB115aCe010f23F55C2591059bBA0) | ### Confidential wrappers | Name | Symbol | Address | Underlying token | | ----------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | | Confidential USDC | `cUSDC` | [`0xe978F22157048E5DB8E5d07971376e86671672B2`](https://eth.blockscout.com/address/0xe978F22157048E5DB8E5d07971376e86671672B2) | [`0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48`](https://eth.blockscout.com/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48) | | Confidential USDT | `cUSDT` | [`0xAe0207C757Aa2B4019Ad96edD0092ddc63EF0c50`](https://eth.blockscout.com/address/0xAe0207C757Aa2B4019Ad96edD0092ddc63EF0c50) | [`0xdAC17F958D2ee523a2206206994597C13D831ec7`](https://eth.blockscout.com/token/0xdAC17F958D2ee523a2206206994597C13D831ec7) | | Confidential WETH | `cWETH` | [`0xda9396b82634Ea99243cE51258B6A5Ae512D4893`](https://eth.blockscout.com/address/0xda9396b82634Ea99243cE51258B6A5Ae512D4893) | [`0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2`](https://eth.blockscout.com/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) | | Confidential BRON | `cBRON` | [`0x85dE671c3bec1aDeD752c3Cea943521181C826bc`](https://eth.blockscout.com/address/0x85dE671c3bec1aDeD752c3Cea943521181C826bc) | [`0xBA2C598E11eD093079cC324FCa5BbbA99F616E83`](https://eth.blockscout.com/token/0xBA2C598E11eD093079cC324FCa5BbbA99F616E83) | | Confidential ZAMA | `cZAMA` | [`0x80CB147Fd86dC6dEe3Eee7e4Cee33d1397d98071`](https://eth.blockscout.com/address/0x80CB147Fd86dC6dEe3Eee7e4Cee33d1397d98071) | [`0xA12CC123ba206d4031D1c7f6223D1C2Ec249f4f3`](https://eth.blockscout.com/token/0xA12CC123ba206d4031D1c7f6223D1C2Ec249f4f3) | | Confidential tGBP | `ctGBP` | [`0xa873750ccBafD5ec7Dd13bfD5237d7129832eDD9`](https://eth.blockscout.com/address/0xa873750ccBafD5ec7Dd13bfD5237d7129832eDD9) | [`0x27f6c8289550fce67f6b50bed1f519966afe5287`](https://eth.blockscout.com/token/0x27f6c8289550fce67f6b50bed1f519966afe5287) | | Confidential XAUt | `cXAUt` | [`0x73cc9aF9d6BEFdb3c3fAf8a5E8c05Cb95FdaEEf1`](https://eth.blockscout.com/address/0x73cc9aF9d6BEFdb3c3fAf8a5E8c05Cb95FdaEEf1) | [`0x68749665FF8D2d112Fa859AA293F07A622782F38`](https://eth.blockscout.com/token/0x68749665FF8D2d112Fa859AA293F07A622782F38) | | Confidential bbqTGBP | `cbbqTGBP` | [`0xBA4cFF6ED6F7Cb2A58776dECa4E984b498446762`](https://eth.blockscout.com/address/0xBA4cFF6ED6F7Cb2A58776dECa4E984b498446762) | [`0xbeeffABcd0dB09589Dd21854aa760C52aB4bf04F`](https://eth.blockscout.com/token/0xbeeffABcd0dB09589Dd21854aa760C52aB4bf04F) | | Confidential steakcUSDC | `csteakcUSDC` | [`0x66Bf74E96900D1a19c7070D939D124f2F565C458`](https://eth.blockscout.com/address/0x66Bf74E96900D1a19c7070D939D124f2F565C458) | [`0xbEEF00A59B577423653A1526c7009bdE103F542B`](https://eth.blockscout.com/token/0xbEEF00A59B577423653A1526c7009bdE103F542B) | | Confidential AUSD | `cAUSD` | [`0xEa9A15A29DD180c40442142CaeEfC491d37bfDB2`](https://eth.blockscout.com/address/0xEa9A15A29DD180c40442142CaeEfC491d37bfDB2) | [`0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a`](https://eth.blockscout.com/token/0x00000000eFE302BEAA2b3e6e1b18d08D69a9012a) | | Confidential WBTC | `cWBTC` | [`0xd86aE89C089B380f064Fe01899B4071F1eb6Bb3d`](https://eth.blockscout.com/address/0xd86aE89C089B380f064Fe01899B4071F1eb6Bb3d) | [`0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599`](https://eth.blockscout.com/token/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599) | | Confidential fAUSDe | `cfAUSDe` | [`0x76A3f985315aAc9789Cb5BF8A5bb83BFF55FD5a6`](https://eth.blockscout.com/address/0x76A3f985315aAc9789Cb5BF8A5bb83BFF55FD5a6) | [`0x32401B9fb79065Bc15949DE0BD43927492f02F0C`](https://eth.blockscout.com/token/0x32401B9fb79065Bc15949DE0BD43927492f02F0C) | | Confidential armcWBTC | `carmcWBTC` | [`0xF921A5B0634f4236B21A4e948317abf9a2E86B6f`](https://eth.blockscout.com/address/0xF921A5B0634f4236B21A4e948317abf9a2E86B6f) | [`0x3d5EcCb62974178236A768A7ef14D3ce468Fbe91`](https://eth.blockscout.com/token/0x3d5EcCb62974178236A768A7ef14D3ce468Fbe91) | | Confidential armUSDTs | `carmUSDTs` | [`0xbaC6DeDf2C10D6D381F9DBd9EFd69D93FfCef50B`](https://eth.blockscout.com/address/0xbaC6DeDf2C10D6D381F9DBd9EFd69D93FfCef50B) | [`0x500aE64100D7DbDb640531085C2F5d40cDC8930D`](https://eth.blockscout.com/token/0x500aE64100D7DbDb640531085C2F5d40cDC8930D) | | Confidential pendleUSDC | `cpendleUSDC` | [`0xb6e5299fc56053DD5440104Fd6Fd2A3CD064edbC`](https://eth.blockscout.com/address/0xb6e5299fc56053DD5440104Fd6Fd2A3CD064edbC) | [`0x55C1B6e461a6334B567bAF0FEb5D728715446f05`](https://eth.blo
프로젝트로 돌아가기