Replay Protection

Replay Protection

Zedkr uses three layers of replay protection. A signed intent can only execute once, on one chain, within its deadline window.

Nonce
Every intent carries a per-user nonce. Once consumed on-chain, that nonce can never be used again. The SDK always fetches the current nonce automatically.
Deadline
Intents include a Unix timestamp deadline. The router rejects any intent submitted after the deadline, even if the nonce hasn't been consumed.
Chain ID
The EIP-712 domain separator includes the chain ID. A signature valid on Coston2 cannot be replayed on Flare mainnet or any other network.
typescript
// Each user has an incrementing nonce stored on-chain
// Once an intent is executed, that nonce is consumed
// Sending the same signed intent again → reverts with "nonce used"

intent.nonce = await client.getNonce(userAddress); // always fresh
Note
The SDK manages nonces automatically. You never need to fetch or track them manually.