ERC-8111 Bound signatures (64-byte signature compression) (Bound Signatures)

Review · Signatures & auth · created 2025-12-23

A standard that fixes the v value of an ECDSA signature at 27, reducing the signature size from 96 bytes to 64 bytes. A signature bound this way has only one valid form and cannot be tampered with.

Why it is needed

The ECDSA signatures widely used in Ethereum are typically conveyed as three values, v, r, and s, occupying 96 bytes under Solidity ABI encoding. However, a recoverable ECDSA signature has the property that flipping both s and v together still produces a valid signature. This means two valid signatures with different shapes can exist for the same message, a property called malleability. Also, v occupies only one degree of freedom in the signature, yet it must be encoded every time, which wastes space. This standard fixes v to a single value of 27 and removes v from the signature entirely. As a result, the signature becomes just 64 bytes consisting of r and s, and the variant signature with s and v flipped is no longer valid, which also eliminates the malleability problem.

What to implement

In depth

The verification rule that fixes v at 27

A smart contract that accepts bound signatures MUST use only 27 for v and MUST NOT accept any other value. The verification code takes the form of calling ecrecover(digest, 27, r, s) and then checking with require(signer != address(0)) that the result is not the zero address. A contract that accepts both 27 and 28 reintroduces malleability, so accepting only a single v value is the core rule of this standard.

The bind transformation procedure

An ECDSA signature MUST be bound before being passed to such a contract. The conversion rule is simple. If the signature's v equals the target value (27 by default), it is returned as is; otherwise, s is replaced with SECP256K1_N - s and v is set to the target value. Here, SECP256K1_N is 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141. This uses the ECDSA property that flipping s and v together still leaves the signature valid, to bring any signature into the v=27 form.

Comparison with ERC-2098

Another signature compression method, ERC-2098, stores the y-parity bit in the top bit of the low s value. The source material explains that bound signatures are better because they are valid input that can be fed directly into the ecrecover precompile. There is no need for the smart contract to unpack the compressed signature, so it costs less gas.

Why 27 and not 28

The reason 27 was chosen between the two values is to make the y-parity a falsy value. Fixing either one would achieve the goals of compression and eliminating malleability, but this standard designates 27 as the standard value.

Cannot be used for transaction signatures

A bound signature is compatible with ecrecover when 27 is passed as the v parameter. However, it cannot be used for transaction signatures. The bind transformation process can produce a high s value, which violates EIP-2. In other words, this standard applies only to applications that verify signatures at the contract level, and it does not change the signature format of Ethereum transactions themselves.

Test cases and reference implementation

The source material provides a table of 3 test cases consisting of signer address, digest, r, and s. The reference implementation is the BoundSignatures library, whose recover(bytes32 digest, bytes32 r, bytes32 s) function calls ecrecover(digest, 27, r, s) and uses require to confirm the result is not the zero address.

Proposal status

This proposal is currently in Review status. It is not yet a finalized standard, so its content may change through discussion.

Things to watch out for

Original ERC · ← ERCs