Skip to content
Chain Defenders

Research · Web3 Security · High

Breeding resolution fails to recheck parent ownership

An owner could request breeding, sell a parent, and still receive the breeding output while consuming a lifetime breeding slot belonging to the buyer’s asset.

9 November 2026

What went wrong

request_breeding checked ownership when an attempt began, but did not lock the parents against marketplace transfers. At resolution, resolve_breeding checked that each supplied parent matched the parent ID recorded in the attempt without rechecking ownership.

// resolve.rs:26-39
#[account(
    seeds = [PRISONER_SEED, &parent1_prisoner.id.to_le_bytes()],
    bump = parent1_prisoner.bump,
    constraint = parent1_prisoner.id == breeding_attempt.parent1_id @ GameError::ParentMismatch,
    // ← no constraint: parent1_prisoner.owner == player.key()
)]
pub parent1_prisoner: Box<Account<'info, Prisoner>>,

The identity check still passed after a sale because transferring ownership did not change the parent's ID. Authorization established when the request began was no longer sufficient at resolution.

Why it mattered

The original requester could receive both the sale proceeds and the breeding output. Meanwhile, resolution incremented the buyer's prisoner's breeding_count and set last_bred_at without the buyer's consent.

The report describes the loss of one of the asset's seven lifetime breeding slots, with no on-chain mechanism for the buyer to recover it. This impact follows from the ownership gap itself and does not depend on the separate zero-cost breeding issue mentioned in the original finding.

The fix

The report recommends checking parent ownership again at resolution. Its alternative is to lock parents when breeding is requested, prevent marketplace listing while the attempt is active, and unlock them when it is resolved or abandoned.

Both approaches address the interval between initial authorization and the later state change.

Takeaway

In an asynchronous operation, validate the authority required at the moment an asset is changed. If ownership can change while the operation is pending, either recheck it or prevent the conflicting transfer.

Finding status: Fixed.

Shipping something similar? We review the code before it holds money.

Request an audit