Short answer: The contract subtracted a larger unsigned number from a smaller one. TEAL integers are unsigned 64-bit and subtraction does not wrap: it fails the call.
Pattern:
logic eval error: - would result negative. Details: app=<APP_ID>, pc=<PC>, opcodes=...
Captured verbatim from a testnet node on 2026-12-03:
logic eval error: - would result negative. Details: app=778835193, pc=155, opcodes=intc_1 // 0; intc_0 // 1; -
The test app ran int 0; int 1; - and the node answered "- would result negative". The message names the operator. The same family of messages exists for other arithmetic opcodes, but only the subtraction wording was captured here.
a >= b) and handle the smaller case explicitly.// TEAL dup int 1 >= assert // make sure a >= b before a - b
Method: this message was produced on purpose against a live testnet node (https://testnet-api.algonode.cloud) on 2026-12-03. Message wording can change between node versions. All errors: index · errors.json.