EXECUTE_SWAP — Group 8, Code 97

Atomic two-sided re-key completing a proposed swap (built on the trade-locker buy path).

Design-stage — parameters are a first draft

Field sizes are drafted from raidax/ideas_for_suspect_raida_servers.txt (Addenda 5–7) and are not final or implementation-verified. The body is encrypted per the header ENC_CODE; see below.

Phase II — later

This command is Phase II: convenience, recovery, or optimization that is not required for the first working move. Optional swap fast-path.

How it works

This finishes a proposed swap by performing the atomic two-sided re-key: the user's root-coin is re-keyed to the counterparty and the counterparty's suspect-coin is re-keyed to the user, in one operation so neither side can end up short. The user supplies a fresh secret (AN) for the coin they are receiving.

It is built on the same proven path the trade-locker “buy” command already uses to transfer coins on a confirmed condition. Because it is a swap of two existing coins, it involves no authority move and no epoch — it can happen any time the counterparties agree.

Direction & encryption

  • Direction: client → counterparty
  • ENC_CODE: 1 (coin AN)

Request Body parameters

FieldBytesDescription
CH (challenge)16Standard challenge / replay protection (per header convention).
swap_ref4The proposed swap to execute.
new_AN16Fresh AN for the coin received.
EOF2Terminator (0x3E3E).

Response Body parameters

FieldBytesDescription
status11 = both sides re-keyed.