From 39edbf62cacba862406ba9b6a4b7c049d2e4a5e7 Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Fri, 19 Dec 2025 19:34:01 +0200 Subject: [PATCH] Add warning comment about wrapper unwrap flow --- contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol b/contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol index 833f124c..deeaf37c 100644 --- a/contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol +++ b/contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol @@ -196,6 +196,10 @@ abstract contract ERC7984ERC20Wrapper is ERC7984, IERC1363Receiver { FHE.makePubliclyDecryptable(burntAmount); assert(_unwrapRequests[burntAmount] == address(0)); + + // WARNING: Storing unwrap requests in a mapping from cipher-text to address assumes that + // cipher-texts are unique--this holds here but is not always true. Be cautious when assuming + // cipher-text uniqueness. _unwrapRequests[burntAmount] = to; emit UnwrapRequested(to, burntAmount);