The RockPaperScissors DApp advertises itself as a "fully decentralized implementation" of the classic Rock-Paper-Scissors game on Ethereum. However, upon reviewing the actual implementation and its security structure, multiple design elements contradict this decentralization claim, introducing centralization risks that should be acknowledged and addressed.
"Rock Paper Scissors DApp is a fully decentralized implementation of the classic Rock Paper Scissors game on Ethereum."
Ownable
Usage in WinningToken.sol
ContractThe WinningToken.sol
contract inherits from OpenZeppelin's Ownable
, and the mint()
function is restricted via onlyOwner
.
This means that the entity which deployed the contract (typically the RockPaperScissors.sol
contract or its deployer) retains full minting control.
This introduces a central point of control that contradicts decentralization.
setAdmin()
Function in RockPaperScissors.sol
Allows the current admin (owner) to change the adminAddress
arbitrarily.
No on-chain governance or access control layers (e.g., multi-sig or timelock).
A malicious or compromised admin could assign themselves or another address and steal accumulated protocol fees or interfere with game settings.
This was verified and demonstrated through a valid Proof-of-Concept exploit.
Contracts lack role-based permissioning via AccessControl
.
No usage of DAOs, community voting, or multisig wallets.
Critical protocol-level actions (minting tokens, withdrawing fees, changing admin) are fully centralized.
Trust dependency: Users must blindly trust that the deployer/admin will not abuse privileges.
Token issuance risk: Unlimited minting of WinningToken
is possible if owner privileges are abused.
Fee control risk: Protocol fees held on contract can be redirected to an attacker via admin key compromise.
To align the implementation with the decentralization claim:
β Remove Ownable
from WinningToken.sol or replace with AccessControl
and restrict mint()
to RockPaperScissors.sol
only.
π Harden admin management in RockPaperScissors.sol
:
Introduce a multi-signature wallet (e.g., Gnosis Safe)
Or replace setAdmin()
with time-locked governance proposals.
βοΈ Introduce max supply for WinningToken.sol
to mitigate infinite inflation.
π« Document all centralized points clearly if temporary or introduce transition plans to decentralize.
While the game logic and user flow are decentralized in spirit, the underlying administrative and token mechanics introduce central points of failure. This undermines the protocolβs claim of being "fully decentralized" and should be addressed transparently for users and security auditors alike.
Aderyn - Solidity Security Extension
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.