Skip to content
Quantix Security Labs

Replay Window

Find every way a signed voucher can be used more than its signer intended, and redesign the signed message.
IntermediateSolidity · BaseSignature replay30–45 minutes

Briefing

An off-chain service signs vouchers that let users claim reward tokens. The same contract is deployed at the same address on two networks.

VoucherClaims.solsolidity
// Quantix Security Research Network — training challenge.// Intentionally vulnerable. Written for education; do not deploy.// SPDX-License-Identifier: MITpragma solidity 0.8.24; interface IMintable {    function mint(address to, uint256 amount) external;} contract VoucherClaims {    address public immutable signer;    IMintable public immutable token;     constructor(address _signer, IMintable _token) {        signer = _signer;        token = _token;    }     function claim(address to, uint256 amount, uint8 v, bytes32 r, bytes32 s) external {        bytes32 digest = keccak256(abi.encodePacked(to, amount));        address recovered = ecrecover(digest, v, r, s);        require(recovered == signer, "bad signature");        token.mint(to, amount);    }}

Hints

Reveal one at a time. Each moves a step closer to the answer.

  1. H1

    Hidden

  2. H2

    Hidden

  3. H3

    Hidden

Solution

Try writing your own explanation and fix before opening it.

References