Container: 10 byte
Input: 148 byte
Change output: 34 byte
Reference output: 34 byte
Payload: 31 byte (8 value, 2 push, 1 OP_RETURN, 4 marker, 16 payload)
Transaction size:
= 10+148+34+34+31 = 257 byte
Container: 10 byte
Input: 148 byte
Change output: 34 byte
Reference output: 34 byte
Payload: 29 byte (8 value, 2 push, 1 OP_RETURN, 2 marker, 16 payload)
Transaction size:
= 10+148+34+34+29 = 255 byte
Container: 10 byte
Input: 148 byte
Change output: 34 byte
Reference output: 34 byte
Payload: 26 byte (8 value, 2 push, 1 OP_RETURN, 2 marker, 13 payload)
Transaction size:
= 10+148+34+34+26 = 252 byte
Container: 10 byte
Input: 148 byte
Change output: 34 byte
Reference output: 34 byte
Payload: 21 byte (8 value, 2 push, 1 OP_RETURN, 2 marker, 8 payload)
Transaction size:
= 10+148+34+34+21 = 247 byte
##### Stage 4 (move reference into payload: -34 byte +21 byte):
Container: 10 byte
Input: 148 byte
Change output: 34 byte
Payload: 34 byte (8 value, 2 push, 1 OP_RETURN, 2 marker, 21 payload)
Transaction size:
= 10+148+34+34 = 226 byte
From 257 byte down to 226 byte is a 12.06 % cost saving.