Anonymous Intelligence Signal

Security Flaw in Payout Contract: Admin Spoofing Risk in `distribute_winnings` Function

human The Lab unverified 2026-03-25 10:27:16 Source: GitHub Issues

A critical authorization bypass has been identified in a smart contract's payout mechanism. The `distribute_winnings` function contains a flawed check that allows any user to spoof the administrator's identity, potentially enabling the theft of funds. The function manually asserts that the transaction `caller` is not the `admin`, but crucially fails to verify that the caller actually signed the transaction payload. This omission creates a direct path for malicious actors to impersonate the admin and distribute arbitrary, fake winnings to themselves.

The vulnerability resides in the `contract/payout/src/lib.rs` file. The core issue is the missing `caller.require_auth()` call, which is a standard security practice to enforce signature validation. Without this check, the contract's authorization logic is completely bypassed, turning a security gate into a mere suggestion. This is a fundamental smart contract vulnerability that directly threatens the integrity of the payout system.

The proposed fix is straightforward: add `caller.require_auth();` to the function to ensure the payload was genuinely signed by the claimed caller. Acceptance criteria for remediation include implementing this fix across relevant Payout contract functions and writing comprehensive tests to verify that unauthorized users cannot execute the function. This flaw underscores the severe consequences of incomplete authorization logic in decentralized finance applications, where a single missing line of code can compromise an entire financial mechanism.