Skip to content

Commit d1fdde2

Browse files
added todo note regarding soundness of tracking sums
1 parent cab55f0 commit d1fdde2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/user-guide/patterns/sums.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,12 @@ as shown below.
112112

113113
Note that the :cvl:`Sload` hook adds a require statement for every balance read.
114114
One should always be cautious with such require statements, as they can be unsound.
115+
116+
.. todo::
117+
118+
* Explain that the :cvl:`require` statement in the hook is equivalent to a forall
119+
statement.
120+
* Show this might be unsound - for example if we added balances in the constructor
121+
not through minting.
122+
* A sound approach is proving an invariant that forall addresses :cvl:`totalSupply()`
123+
is greater than :cvl:`balanceOf(address)`.

0 commit comments

Comments
 (0)