F-2025-0009·ownership-transfer-risk

Use of Ownable instead of Ownable2Step enables accidental permanent loss of admin control

Fixedlotterypixel-lotterychainlink-vrf
TL;DR

Both contracts use Ownable rather than Ownable2Step, so a typo'd or unreachable address in transferOwnership() permanently strands ownership and freezes all admin operations.

Severity
LOW
Impact
HIGH
Likelihood
LOW
Method
MManual review
CAT.
Complexity
LOW
Exploitability
LOW
02Section · Description

Description

Both contracts use OpenZeppelin's basic Ownable pattern instead of the safer Ownable2Step variant. This creates a risk of permanent loss of administrative control through accidental ownership transfer to an incorrect or unusable address.

The basic Ownable pattern allows single-transaction ownership transfer via transferOwnership(), which immediately and irreversibly transfers control. If the new owner address is incorrect (due to typos, wrong network, or targeting a contract that cannot call admin functions), the protocol becomes permanently unmanageable.

Given that both contracts have critical owner-controlled functions that manage fund distribution and protocol parameters, loss of ownership would result in:

  • Inability to update protocol configuration
  • Inability to change fund distribution addresses
  • Inability to manage team shares
  • Potential permanent freezing of administrative capabilities
03Section · Recommendation

Recommendation

Replace Ownable with Ownable2Step in both contracts:

solidity
import {Ownable2Step} from "@openzeppelin/contracts/access/Ownable2Step.sol";
contract DPLTeam is Ownable2Step, ReentrancyGuard {
constructor() Ownable(msg.sender) {}
}
contract PixelLotteryAPE is ReentrancyGuard, Ownable2Step, IVRFSystemCallback {
constructor(...) Ownable(msg.sender) {}
}

The Ownable2Step pattern requires a two-step process:

  1. Current owner calls transferOwnership(newOwner) (ownership becomes pending)
  2. New owner must call acceptOwnership() to confirm the transfer

This prevents accidental permanent loss of control by ensuring the new owner address is valid and accessible before the transfer is finalized.

04Section · Resolution

Resolution

Golden Grid: Confirmed. Will use Ownable2Step for DPLTeam and Role-based AccessControl for the main lottery contract.

Zealynx: Fixed. Agreed with the discussed solution.

Status
Fixed
F-2025-0009

oog
zealynx

Smart Contract Security Digest

Monthly exploit breakdowns, audit checklists, and DeFi security research — straight to your inbox

© 2026 Zealynx