diff --git a/EIPS/eip-663.md b/EIPS/eip-663.md index 9c8b126479bf88..f8b9306c0a51bc 100644 --- a/EIPS/eip-663.md +++ b/EIPS/eip-663.md @@ -39,11 +39,13 @@ If the code is valid EOF1, the following execution rules apply: 1. These instructions are followed by an 8-bit immediate value, which we call `imm`, and can have a value of 0 to 255. We introduce the variable `n` which equals to `imm + 17`. 2. For `DUPN`: + - If the current stack height is less than `n`, then a stack underflow exception is issued. - If the current stack height is at the limit (1024), a stack overflow exception is issued. - Otherwise the `n`'th stack item is duplicated at the top of the stack. (*Note: We use 1-based indexing here.*) 3. For `SWAPN`: + - If the current stack height is less than `n + 1`, then a stack underflow exception is issued. - Otherwise the `n + 1`th stack item is swapped with the top stack item.