From b49cfc52c4a609472c5273ed706796f5bdfa705b Mon Sep 17 00:00:00 2001 From: Danno Ferrin Date: Sun, 2 Mar 2025 23:25:33 +0100 Subject: [PATCH] Update EIP-663: Add rationale for immediate arguments Add a rationale for immediate arguments instead of arguments from the operand stack. --- EIPS/eip-663.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/EIPS/eip-663.md b/EIPS/eip-663.md index 116f8f620b3246..17f87eeb5c9f3b 100644 --- a/EIPS/eip-663.md +++ b/EIPS/eip-663.md @@ -56,6 +56,10 @@ The gas cost for all three instructions is set at 3. ## Rationale +### Use of an immediate argument + +Allowing dynamic selection of the arguments to swap, dup, or exchange could be used to prevent static analysis of the contents of the stack. Since static analysis is an important tool for security auditors we want to do what we can to make their jobs easier. Hence, the operands require an immediate argument that is not dynamic in nature. + ### EOF-only Since this instruction depends on an immediate argument encoding, it can only be enabled within EOF. In legacy bytecode that encoding could contradict jumpdest-analysis.