Skip to content

Commit 5ce2857

Browse files
committed
chore(protocol-contracts): improve documentation
1 parent d7579d8 commit 5ce2857

File tree

1 file changed

+9
-2
lines changed
  • protocol-contracts/confidential-wrapper/docs

1 file changed

+9
-2
lines changed

protocol-contracts/confidential-wrapper/docs/README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,19 @@ The unwrap mechanism stores requests in a mapping keyed by ciphertext and the cu
281281

282282
The maximum number of decimals `_maxDecimals()` for the confidential token is currently set to **6 decimals** only. This is due to FHE limitations as confidential balances must be represented by the euint64 encrypted datatype.
283283

284-
It is possible that future implementations of the wrapper set a higher `_maxDecimals()` value to better suit the needs of the underlying token. For example, WBTC might require 8 decimals since using only 6 would make the smallest unit impractically expensive.
284+
It is possible that future implementations of the wrapper set a higher `_maxDecimals()` value to better suit the needs of the underlying token. For example, cWBTC might require 8 decimals since using only 6 would make the smallest unit impractically expensive.
285285

286286
At deployment, the confidential wrapper sets its number of decimals as:
287287
- the number of decimals of the underlying token if it is less than `_maxDecimals()`
288288
- `_maxDecimals()` otherwise
289289

290+
**Example with `_maxDecimals()` set to 6**
291+
| Underlying Decimals | Wrapper Decimals | Example |
292+
|---------------------|------------------|---------|
293+
| 18 | 6 | ZAMA/cZAMA
294+
| 6 | 6 | USDT/cUSDT
295+
| 2 | 2 | GUSD/cGUSD
296+
290297
Once a confidential wrapper contract is deployed, this number cannot be updated. It can be viewed with the following view function:
291298

292299
```solidity
@@ -295,7 +302,7 @@ wrapper.decimals();
295302

296303
### Maximum total supply
297304

298-
The maximum total supply for the confidential token is currently set to 2^64 - 1 due to FHE limitations.
305+
The maximum total supply for the confidential token is currently set to `type(uint64).max` (`2^64 - 1`) due to FHE limitations.
299306

300307
---
301308

0 commit comments

Comments
 (0)