VegaSec / Solidity scan report

unchecked-call-king.sol

VSS-20261003-R4ZY40PA · generated Oct 3, 2026, 7:53 PM

High caution22 findings3 highPasted source2 warningssemgrep 1.163.0

Verdict is derived from severity counts via the same deterministic formula every VegaSec report uses. unchecked-call-king.sol was scanned from pasted source. This is static-analysis triage, not a certification or formal audit attestation.

Signature

signed

This report is signed. Anyone can verify that these exact bytes came from us, with no account, no wallet and no API key. The signature proves integrity and authorship. It does not prove the audited contract is safe: read the coverage status and the limitations above.

sha256
0d532bf62d553222...e8426ec7
Signed by
Ed25519 key vsig-2026-09
Canonical version
vss-canonical-1
Bytes served
stored canonical text, byte for byte

PDF artifact

Queued artifact pipeline · not blocking on the scan

Not requested

No PDF artifact has been requested for this report yet. The HTML report and the Markdown export already carry the full disclaimer and limitations inline. PDF synthesis is a queued artifact, not part of the scan path.

Status endpoint

GET /report/solidity/VSS-20261003-R4ZY40PA/export.pdf

Solidity evidence report

22 audit findings

critical: 0high: 3medium: 3low: 3informational: 13

Severity distribution

Executive summary

  • 22 findings surfaced (0 critical, 3 high, 3 medium, 3 low, 13 informational).
  • HIGH · PoCGame.play() (unchecked-call-king.sol#141-169) uses a weak PRNG: "winningNumber = uint256(keccak256()(abi.encodePacked(blockhash(uint256)(blockNumber),msg.sen (play) — exploitability medium.
  • HIGH · PoCGame.payout(address) (unchecked-call-king.sol#185-192) sends eth to arbitrary user (payout) — exploitability medium.
  • HIGH · PoCGame.loseWager(uint256) (unchecked-call-king.sol#209-216) sends eth to arbitrary user (loseWager) — exploitability medium.
  • Automated static analysis only. A human operator review has not been attached to this report.

Warnings (2)

  • · Unmapped detector slither:unindexed-event-address — classified as 'other'
  • · Unmapped detector slither:unused-state — classified as 'other'
semgrep 1.163.0
  • highOracle manipulationConfidence: mediumExploitability: mediumDetector: slither

    PoCGame.play() (unchecked-call-king.sol#141-169) uses a weak PRNG: "winningNumber = uint256(keccak256()(abi.encodePacked(blockhash(uint256)(blockNumber),msg.sen

    Affected location
    unchecked-call-king.sol:141-169 · play
    Detector / source
    slither · slither:weak-prng

    Evidence

    PoCGame.play() (unchecked-call-king.sol#141-169) uses a weak PRNG: "winningNumber = uint256(keccak256()(abi.encodePacked(blockhash(uint256)(blockNumber),msg.sender))) % difficulty + 1 (unchecked-call-king.sol#153)"

    Exploitability notes

    Medium-confidence detection; manual review required before relying on the finding either way.

    Remediation

    Use multi-source price feeds (e.g. Chainlink + TWAPs) and validate freshness/deviation before consuming oracle data on-chain.

    Limitations

    • Medium analyzer confidence; manual review should confirm the code path and preconditions.
    • Exploitability depends on deployment context, permissions, balances, and reachable preconditions.
    • Analyzer output did not include a source excerpt for this finding.
  • highAccess controlConfidence: mediumExploitability: mediumDetector: slither

    PoCGame.payout(address) (unchecked-call-king.sol#185-192) sends eth to arbitrary user

    Affected location
    unchecked-call-king.sol:185-192 · payout
    Detector / source
    slither · slither:arbitrary-send-eth

    Evidence

    PoCGame.payout(address) (unchecked-call-king.sol#185-192) sends eth to arbitrary user Dangerous calls: - winner.transfer(ethToTransfer) (unchecked-call-king.sol#190)

    Exploitability notes

    Medium-confidence detection; manual review required before relying on the finding either way.

    Remediation

    Gate privileged functions behind a tested role/ownership pattern (e.g. OpenZeppelin Ownable/AccessControl). Avoid tx.origin for authorization.

    Limitations

    • Medium analyzer confidence; manual review should confirm the code path and preconditions.
    • Exploitability depends on deployment context, permissions, balances, and reachable preconditions.
    • Analyzer output did not include a source excerpt for this finding.
  • highAccess controlConfidence: mediumExploitability: mediumDetector: slither

    PoCGame.loseWager(uint256) (unchecked-call-king.sol#209-216) sends eth to arbitrary user

    Affected location
    unchecked-call-king.sol:209-216 · loseWager
    Detector / source
    slither · slither:arbitrary-send-eth

    Evidence

    PoCGame.loseWager(uint256) (unchecked-call-king.sol#209-216) sends eth to arbitrary user Dangerous calls: - whale.call.value(amount)(bytes4(keccak256()(donate()))) (unchecked-call-king.sol#213)

    Exploitability notes

    Medium-confidence detection; manual review required before relying on the finding either way.

    Remediation

    Gate privileged functions behind a tested role/ownership pattern (e.g. OpenZeppelin Ownable/AccessControl). Avoid tx.origin for authorization.

    Limitations

    • Medium analyzer confidence; manual review should confirm the code path and preconditions.
    • Exploitability depends on deployment context, permissions, balances, and reachable preconditions.
    • Analyzer output did not include a source excerpt for this finding.
  • mediumAccess controlConfidence: unknownExploitability: unknownDetector: semgrep

    Use of tx.origin for authorization

    Affected location
    unchecked-call-king.sol:30
    Detector / source
    semgrep · semgrep:vegasec-tx-origin-auth

    Evidence

    Use of tx.origin for authorization. tx.origin can be tricked via phishing contracts. Prefer msg.sender.

    Exploitability notes

    Analyzer did not report a confidence level; treat as unverified until reviewed.

    Remediation

    Gate privileged functions behind a tested role/ownership pattern (e.g. OpenZeppelin Ownable/AccessControl). Avoid tx.origin for authorization.

    Limitations

    • Analyzer did not report confidence; fail closed and treat the finding as unverified.
    • Static analysis did not prove exploitability; do not present this as an exploit claim.
    • Analyzer output did not include a source excerpt for this finding.
  • mediumUnchecked callConfidence: mediumExploitability: mediumDetector: slither

    PoCGame.donateToWhale(uint256) (unchecked-call-king.sol#197-204) ignores return value by whale.call.value(amount)(bytes4(keccak256()(donate()))) (unchecked-call

    Affected location
    unchecked-call-king.sol:197-204 · donateToWhale
    Detector / source
    slither · slither:unchecked-lowlevel

    Evidence

    PoCGame.donateToWhale(uint256) (unchecked-call-king.sol#197-204) ignores return value by whale.call.value(amount)(bytes4(keccak256()(donate()))) (unchecked-call-king.sol#201)

    Exploitability notes

    Medium-confidence detection; manual review required before relying on the finding either way.

    Remediation

    Check the boolean return of low-level call/delegatecall/send and revert on failure with a descriptive reason string.

    Limitations

    • Medium analyzer confidence; manual review should confirm the code path and preconditions.
    • Exploitability depends on deployment context, permissions, balances, and reachable preconditions.
    • Analyzer output did not include a source excerpt for this finding.
  • mediumUnchecked callConfidence: mediumExploitability: mediumDetector: slither

    PoCGame.loseWager(uint256) (unchecked-call-king.sol#209-216) ignores return value by whale.call.value(amount)(bytes4(keccak256()(donate()))) (unchecked-call-kin

    Affected location
    unchecked-call-king.sol:209-216 · loseWager
    Detector / source
    slither · slither:unchecked-lowlevel

    Evidence

    PoCGame.loseWager(uint256) (unchecked-call-king.sol#209-216) ignores return value by whale.call.value(amount)(bytes4(keccak256()(donate()))) (unchecked-call-king.sol#213)

    Exploitability notes

    Medium-confidence detection; manual review required before relying on the finding either way.

    Remediation

    Check the boolean return of low-level call/delegatecall/send and revert on failure with a descriptive reason string.

    Limitations

    • Medium analyzer confidence; manual review should confirm the code path and preconditions.
    • Exploitability depends on deployment context, permissions, balances, and reachable preconditions.
    • Analyzer output did not include a source excerpt for this finding.
  • lowAccess controlConfidence: mediumExploitability: mediumDetector: slither

    PoCGame.constructor(address,uint256).whaleAddress (unchecked-call-king.sol#67) lacks a zero-check on :

    Affected location
    unchecked-call-king.sol:67 · whaleAddress
    Detector / source
    slither · slither:missing-zero-check

    Evidence

    PoCGame.constructor(address,uint256).whaleAddress (unchecked-call-king.sol#67) lacks a zero-check on : - whale = whaleAddress (unchecked-call-king.sol#73)

    Exploitability notes

    Medium-confidence detection; manual review required before relying on the finding either way.

    Remediation

    Gate privileged functions behind a tested role/ownership pattern (e.g. OpenZeppelin Ownable/AccessControl). Avoid tx.origin for authorization.

    Limitations

    • Medium analyzer confidence; manual review should confirm the code path and preconditions.
    • Exploitability depends on deployment context, permissions, balances, and reachable preconditions.
    • Analyzer output did not include a source excerpt for this finding.
  • lowReentrancyConfidence: mediumExploitability: mediumDetector: slither

    Reentrancy in PoCGame.donateToWhale(uint256) (unchecked-call-king.sol#197-204):

    Affected location
    unchecked-call-king.sol:197-204 · donateToWhale
    Detector / source
    slither · slither:reentrancy-events

    Evidence

    Reentrancy in PoCGame.donateToWhale(uint256) (unchecked-call-king.sol#197-204): External calls: - whale.call.value(amount)(bytes4(keccak256()(donate()))) (unchecked-call-king.sol#201) Event emitted after the call(s): - Donate(amount,whale,msg.sender) (unchecked-call-king.sol#203)

    Exploitability notes

    Medium-confidence detection; manual review required before relying on the finding either way.

    Remediation

    Apply the checks-effects-interactions pattern. State writes must happen before external calls, and consider OpenZeppelin's ReentrancyGuard for high-risk entry points.

    Limitations

    • Medium analyzer confidence; manual review should confirm the code path and preconditions.
    • Exploitability depends on deployment context, permissions, balances, and reachable preconditions.
    • Analyzer output did not include a source excerpt for this finding.
  • lowReentrancyConfidence: mediumExploitability: mediumDetector: slither

    Reentrancy in PoCGame.loseWager(uint256) (unchecked-call-king.sol#209-216):

    Affected location
    unchecked-call-king.sol:209-216 · loseWager
    Detector / source
    slither · slither:reentrancy-events

    Evidence

    Reentrancy in PoCGame.loseWager(uint256) (unchecked-call-king.sol#209-216): External calls: - whale.call.value(amount)(bytes4(keccak256()(donate()))) (unchecked-call-king.sol#213) Event emitted after the call(s): - Lose(amount,msg.sender) (unchecked-call-king.sol#215)

    Exploitability notes

    Medium-confidence detection; manual review required before relying on the finding either way.

    Remediation

    Apply the checks-effects-interactions pattern. State writes must happen before external calls, and consider OpenZeppelin's ReentrancyGuard for high-risk entry points.

    Limitations

    • Medium analyzer confidence; manual review should confirm the code path and preconditions.
    • Exploitability depends on deployment context, permissions, balances, and reachable preconditions.
    • Analyzer output did not include a source excerpt for this finding.
  • informationalLogicConfidence: highExploitability: lowDetector: slither

    Version constraint ^0.4.24 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html)

    Affected location
    unchecked-call-king.sol:7 · ^0.4.24
    Detector / source
    slither · slither:solc-version

    Evidence

    Version constraint ^0.4.24 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) - DirtyBytesArrayToStorage - ABIDecodeTwoDimensionalArrayMemory - KeccakCaching - EmptyByteArrayCopy - DynamicArrayCleanup - ImplicitConstructorCallvalueCheck - TupleAssignmentMultiStackSlotComponents - MemoryArrayCreationOverflow - privateCanBeOverridden - SignedArrayStorageCopy - ABIEncoderV2StorageArrayWithMultiSlotElement - DynamicConstructorArgumentsClippedABIV2 - UninitializedFunctionPointerInConstructor_0.4.x - IncorrectEventSignatureInLibraries_0.4.x - ABIEncoderV2PackedStorage_0.4.x - ExpExponentCleanup - EventStructWrongData. It is used by: - ^0.4.24 (unchecked-call-king.sol#7)

    Exploitability notes

    Informational signal; not directly exploitable without additional context.

    Remediation

    Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.

    Limitations

    • High analyzer confidence, still requires source-level review before promotion.
    • Direct exploitability is not established; keep the signal as a remediation/checklist item.
    • Analyzer output did not include a source excerpt for this finding.
  • informationalOtherConfidence: highExploitability: lowDetector: slither

    Event PoCGame.Wager(uint256,address) (unchecked-call-king.sol#44) has address parameters but no indexed parameters

    Affected location
    unchecked-call-king.sol:44 · Wager
    Detector / source
    slither · slither:unindexed-event-address

    Evidence

    Event PoCGame.Wager(uint256,address) (unchecked-call-king.sol#44) has address parameters but no indexed parameters

    Exploitability notes

    Informational signal; not directly exploitable without additional context.

    Remediation

    Review the detector output against the source manually; if exploitable, design a fix and add a regression test before deploying.

    Limitations

    • High analyzer confidence, still requires source-level review before promotion.
    • Direct exploitability is not established; keep the signal as a remediation/checklist item.
    • Analyzer output did not include a source excerpt for this finding.
  • informationalOtherConfidence: highExploitability: lowDetector: slither

    Event PoCGame.Win(uint256,address) (unchecked-call-king.sol#45) has address parameters but no indexed parameters

    Affected location
    unchecked-call-king.sol:45 · Win
    Detector / source
    slither · slither:unindexed-event-address

    Evidence

    Event PoCGame.Win(uint256,address) (unchecked-call-king.sol#45) has address parameters but no indexed parameters

    Exploitability notes

    Informational signal; not directly exploitable without additional context.

    Remediation

    Review the detector output against the source manually; if exploitable, design a fix and add a regression test before deploying.

    Limitations

    • High analyzer confidence, still requires source-level review before promotion.
    • Direct exploitability is not established; keep the signal as a remediation/checklist item.
    • Analyzer output did not include a source excerpt for this finding.
  • informationalOtherConfidence: highExploitability: lowDetector: slither

    Event PoCGame.Lose(uint256,address) (unchecked-call-king.sol#46) has address parameters but no indexed parameters

    Affected location
    unchecked-call-king.sol:46 · Lose
    Detector / source
    slither · slither:unindexed-event-address

    Evidence

    Event PoCGame.Lose(uint256,address) (unchecked-call-king.sol#46) has address parameters but no indexed parameters

    Exploitability notes

    Informational signal; not directly exploitable without additional context.

    Remediation

    Review the detector output against the source manually; if exploitable, design a fix and add a regression test before deploying.

    Limitations

    • High analyzer confidence, still requires source-level review before promotion.
    • Direct exploitability is not established; keep the signal as a remediation/checklist item.
    • Analyzer output did not include a source excerpt for this finding.
  • informationalOtherConfidence: highExploitability: lowDetector: slither

    Event PoCGame.Donate(uint256,address,address) (unchecked-call-king.sol#47) has address parameters but no indexed parameters

    Affected location
    unchecked-call-king.sol:47 · Donate
    Detector / source
    slither · slither:unindexed-event-address

    Evidence

    Event PoCGame.Donate(uint256,address,address) (unchecked-call-king.sol#47) has address parameters but no indexed parameters

    Exploitability notes

    Informational signal; not directly exploitable without additional context.

    Remediation

    Review the detector output against the source manually; if exploitable, design a fix and add a regression test before deploying.

    Limitations

    • High analyzer confidence, still requires source-level review before promotion.
    • Direct exploitability is not established; keep the signal as a remediation/checklist item.
    • Analyzer output did not include a source excerpt for this finding.
  • informationalLogicConfidence: highExploitability: lowDetector: slither

    PoCGame.randomSeed (unchecked-call-king.sol#57) should be constant

    Affected location
    unchecked-call-king.sol:57 · randomSeed
    Detector / source
    slither · slither:constable-states

    Evidence

    PoCGame.randomSeed (unchecked-call-king.sol#57) should be constant

    Exploitability notes

    Informational signal; not directly exploitable without additional context.

    Remediation

    Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.

    Limitations

    • High analyzer confidence, still requires source-level review before promotion.
    • Direct exploitability is not established; keep the signal as a remediation/checklist item.
    • Analyzer output did not include a source excerpt for this finding.
  • informationalOtherConfidence: highExploitability: lowDetector: slither

    PoCGame.randomSeed (unchecked-call-king.sol#57) is never used in PoCGame (unchecked-call-king.sol#9-291)

    Affected location
    unchecked-call-king.sol:57 · randomSeed
    Detector / source
    slither · slither:unused-state

    Evidence

    PoCGame.randomSeed (unchecked-call-king.sol#57) is never used in PoCGame (unchecked-call-king.sol#9-291)

    Exploitability notes

    Informational signal; not directly exploitable without additional context.

    Remediation

    Review the detector output against the source manually; if exploitable, design a fix and add a regression test before deploying.

    Limitations

    • High analyzer confidence, still requires source-level review before promotion.
    • Direct exploitability is not established; keep the signal as a remediation/checklist item.
    • Analyzer output did not include a source excerpt for this finding.
  • informationalLogicConfidence: highExploitability: lowDetector: slither

    Function PoCGame.OpenToThePublic() (unchecked-call-king.sol#83-88) is not in mixedCase

    Affected location
    unchecked-call-king.sol:83-88 · OpenToThePublic
    Detector / source
    slither · slither:naming-convention

    Evidence

    Function PoCGame.OpenToThePublic() (unchecked-call-king.sol#83-88) is not in mixedCase

    Exploitability notes

    Informational signal; not directly exploitable without additional context.

    Remediation

    Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.

    Limitations

    • High analyzer confidence, still requires source-level review before promotion.
    • Direct exploitability is not established; keep the signal as a remediation/checklist item.
    • Analyzer output did not include a source excerpt for this finding.
  • informationalLogicConfidence: highExploitability: lowDetector: slither

    Function PoCGame.AdjustBetAmounts(uint256) (unchecked-call-king.sol#93-100) is not in mixedCase

    Affected location
    unchecked-call-king.sol:93-100 · AdjustBetAmounts
    Detector / source
    slither · slither:naming-convention

    Evidence

    Function PoCGame.AdjustBetAmounts(uint256) (unchecked-call-king.sol#93-100) is not in mixedCase

    Exploitability notes

    Informational signal; not directly exploitable without additional context.

    Remediation

    Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.

    Limitations

    • High analyzer confidence, still requires source-level review before promotion.
    • Direct exploitability is not established; keep the signal as a remediation/checklist item.
    • Analyzer output did not include a source excerpt for this finding.
  • informationalLogicConfidence: highExploitability: lowDetector: slither

    Function PoCGame.AdjustDifficulty(uint256) (unchecked-call-king.sol#105-112) is not in mixedCase

    Affected location
    unchecked-call-king.sol:105-112 · AdjustDifficulty
    Detector / source
    slither · slither:naming-convention

    Evidence

    Function PoCGame.AdjustDifficulty(uint256) (unchecked-call-king.sol#105-112) is not in mixedCase

    Exploitability notes

    Informational signal; not directly exploitable without additional context.

    Remediation

    Re-derive the business rule by hand, write a property-based test that fails on the current path, and only then fix the implementation.

    Limitations

    • High analyzer confidence, still requires source-level review before promotion.
    • Direct exploitability is not established; keep the signal as a remediation/checklist item.
    • Analyzer output did not include a source excerpt for this finding.
  • informationalReentrancyConfidence: mediumExploitability: lowDetector: slither

    Reentrancy in PoCGame.payout(address) (unchecked-call-king.sol#185-192):

    Affected location
    unchecked-call-king.sol:185-192 · payout
    Detector / source
    slither · slither:reentrancy-unlimited-gas

    Evidence

    Reentrancy in PoCGame.payout(address) (unchecked-call-king.sol#185-192): External calls: - winner.transfer(ethToTransfer) (unchecked-call-king.sol#190) Event emitted after the call(s): - Win(ethToTransfer,winner) (unchecked-call-king.sol#191)

    Exploitability notes

    Informational signal; not directly exploitable without additional context.

    Remediation

    Apply the checks-effects-interactions pattern. State writes must happen before external calls, and consider OpenZeppelin's ReentrancyGuard for high-risk entry points.

    Limitations

    • Medium analyzer confidence; manual review should confirm the code path and preconditions.
    • Direct exploitability is not established; keep the signal as a remediation/checklist item.
    • Analyzer output did not include a source excerpt for this finding.
  • informationalUnchecked callConfidence: highExploitability: lowDetector: slither

    Low level call in PoCGame.donateToWhale(uint256) (unchecked-call-king.sol#197-204):

    Affected location
    unchecked-call-king.sol:197-204 · donateToWhale
    Detector / source
    slither · slither:low-level-calls

    Evidence

    Low level call in PoCGame.donateToWhale(uint256) (unchecked-call-king.sol#197-204): - whale.call.value(amount)(bytes4(keccak256()(donate()))) (unchecked-call-king.sol#201)

    Exploitability notes

    Informational signal; not directly exploitable without additional context.

    Remediation

    Check the boolean return of low-level call/delegatecall/send and revert on failure with a descriptive reason string.

    Limitations

    • High analyzer confidence, still requires source-level review before promotion.
    • Direct exploitability is not established; keep the signal as a remediation/checklist item.
    • Analyzer output did not include a source excerpt for this finding.
  • informationalUnchecked callConfidence: highExploitability: lowDetector: slither

    Low level call in PoCGame.loseWager(uint256) (unchecked-call-king.sol#209-216):

    Affected location
    unchecked-call-king.sol:209-216 · loseWager
    Detector / source
    slither · slither:low-level-calls

    Evidence

    Low level call in PoCGame.loseWager(uint256) (unchecked-call-king.sol#209-216): - whale.call.value(amount)(bytes4(keccak256()(donate()))) (unchecked-call-king.sol#213)

    Exploitability notes

    Informational signal; not directly exploitable without additional context.

    Remediation

    Check the boolean return of low-level call/delegatecall/send and revert on failure with a descriptive reason string.

    Limitations

    • High analyzer confidence, still requires source-level review before promotion.
    • Direct exploitability is not established; keep the signal as a remediation/checklist item.
    • Analyzer output did not include a source excerpt for this finding.

Limitations

  • VegaSec runs static analysis only. Findings can include false positives, miss patterns the configured detectors do not cover, and never replace manual auditor judgement.
  • Scan ran slither and semgrep against a single sandboxed copy of the source. Multi-file dependency analysis beyond what slither resolves automatically is out of scope.
  • Some detectors emitted warnings (see `warnings`); their output was still ingested but should be read with extra care.
  • This report is not a certification, audit attestation, or financial advice.

Exploit reasoning

Reference-grade reasoning tied to evidence

  • 24684be4ce7b1d0624f6aa5734696539d0b19d49a315d996f73d5d6d31b1cb53 · oracle-manipulationhigh
    Confidence: low

    Conditions point at the exploit but at least one precondition needs operator confirmation.

    Preconditions

    • Price or rate read from an on-chain source that can be moved in the same block by the caller
    • Decisions (mint amount, collateral check) derived from the manipulable price

    Action

    Attacker uses a flash loan or large swap to move the oracle price in the same block, triggers the price-dependent action, then reverts the price.

    Impact

    Mint of more shares than collateral warrants, undercollateralized borrow, or theft of liquidity by exploiting the manipulated rate.

    False-positive caveats

    • The oracle may be a time-weighted aggregator that resists single-block movement.
    • The function may compare against a snapshot taken on a separate block.

    Remediation checklist

    • Use a TWAP (time-weighted average price) over multiple blocks.
    • Cross-check at least two independent oracle sources before acting.
    • Reject prices that diverge from a recent average by more than a documented threshold.
  • 48a28741e496c51c935b3ced1a836ca4f1cf0dfaa3112afe3a14f8b52c03558e · access-controlhigh
    Confidence: low

    Conditions point at the exploit but at least one precondition needs operator confirmation.

    Preconditions

    • Sensitive function lacks an explicit caller restriction or relies on tx.origin
    • Caller controls the path that reaches the function

    Action

    Attacker calls the unprotected function from an attacker-controlled address, bypassing the intended restriction.

    Impact

    Unauthorized state mutation: ownership transfer, parameter changes, balance writes, or admin-only operations executed by a non-admin.

    False-positive caveats

    • The function may be intentionally callable by anyone (e.g. a public mint with a price guard).
    • Access control may live in a modifier the analyzer did not parse.

    Remediation checklist

    • Replace tx.origin checks with msg.sender against a role registry.
    • Add a `onlyRole(...)` or equivalent modifier from a vetted access control library.
    • Add unit tests that assert non-admin callers revert.
  • 7eb9e648df1d5a634e5136c64d4a361ddb8c65f891519d1c068b1e8b8b5059aa · access-controlhigh
    Confidence: low

    Conditions point at the exploit but at least one precondition needs operator confirmation.

    Preconditions

    • Sensitive function lacks an explicit caller restriction or relies on tx.origin
    • Caller controls the path that reaches the function

    Action

    Attacker calls the unprotected function from an attacker-controlled address, bypassing the intended restriction.

    Impact

    Unauthorized state mutation: ownership transfer, parameter changes, balance writes, or admin-only operations executed by a non-admin.

    False-positive caveats

    • The function may be intentionally callable by anyone (e.g. a public mint with a price guard).
    • Access control may live in a modifier the analyzer did not parse.

    Remediation checklist

    • Replace tx.origin checks with msg.sender against a role registry.
    • Add a `onlyRole(...)` or equivalent modifier from a vetted access control library.
    • Add unit tests that assert non-admin callers revert.
  • ad1681cf1e1f71d426da6ff2004977050c79ee8ebb05b641f2151acdcbbecbbc · access-controlmedium

    Not determined

    Question: Is this finding exploitable in this specific contract?

    Reason: Analyzer confidence or exploitability is unknown; the narrative would overclaim without operator review.

  • 4b8216ee5210c66d73e8810d1a9cc9723a0f7feaa5796389574d53eab61d7ba3 · unchecked-callmedium
    Confidence: low

    Conditions point at the exploit but at least one precondition needs operator confirmation.

    Preconditions

    • Low-level call (`.call`, `.delegatecall`, `.send`) whose return value is ignored
    • Subsequent logic assumes the call succeeded

    Action

    Attacker forces the called contract to fail (out of gas, revert) so the outer function keeps accounting for state the call never wrote.

    Impact

    Funds marked as transferred that never moved; balances debited without the corresponding credit.

    False-positive caveats

    • Some unchecked sends are intentional (best-effort fee distribution).
    • Return value may be checked indirectly via reentrancy guards or balance assertions.

    Remediation checklist

    • Require the return value of `.call()` / `.send()` and revert on failure.
    • Prefer `.transfer()` only for low-gas pure transfers; otherwise use OpenZeppelin Address.functionCall.
    • Add tests covering recipient-revert paths.
  • 4e06ae808e4024e548f55350db9f869c3fefa9c9ac811f052ecc1643d5515ead · unchecked-callmedium
    Confidence: low

    Conditions point at the exploit but at least one precondition needs operator confirmation.

    Preconditions

    • Low-level call (`.call`, `.delegatecall`, `.send`) whose return value is ignored
    • Subsequent logic assumes the call succeeded

    Action

    Attacker forces the called contract to fail (out of gas, revert) so the outer function keeps accounting for state the call never wrote.

    Impact

    Funds marked as transferred that never moved; balances debited without the corresponding credit.

    False-positive caveats

    • Some unchecked sends are intentional (best-effort fee distribution).
    • Return value may be checked indirectly via reentrancy guards or balance assertions.

    Remediation checklist

    • Require the return value of `.call()` / `.send()` and revert on failure.
    • Prefer `.transfer()` only for low-gas pure transfers; otherwise use OpenZeppelin Address.functionCall.
    • Add tests covering recipient-revert paths.

Audit pipeline

Audit cockpit

Honest stage-by-stage view of what VegaSec ran against this contract. Automated stages do not replace a human operator review.

Passed: 3Partial: 5Blocked: 1
  1. Audit intake

    Passed320ms replay7:53 PM

    Normalize the submitted contract target and confirm it can enter the Solidity audit lane.

    Next: Acquire verified source or scan the pasted Solidity source.

  2. Source acquisition

    Passed1.4s replay7:53 PM

    Resolve pasted source or verified explorer source without treating malformed input as demo data.

    Next: Validate the analyzer toolchain against the acquired source.

  3. Toolchain validation

    Partial2.3s replay7:53 PM

    Confirm the configured static analyzers can run and produce parseable output.

    Next: Run static analysis and capture raw detector evidence.

    • One or more analyzers emitted warnings; report findings remain usable but should be read with limitations.
  4. Static analysis

    Partial22 findings8.8s replay7:53 PM

    Run static analyzers against the sandboxed source and collect raw detector evidence.

    Next: Normalize detector output into one deduped finding set.

    • One or more analyzers emitted warnings; report findings remain usable but should be read with limitations.
  5. Finding normalization

    Passed22 findings1.1s replay7:53 PM

    Dedupe detectors, classify vulnerability classes and compute severity-weighted risk.

    Next: Review exploitability conservatively against confidence and limitations.

  6. Exploitability review

    Partial22 findings1.9s replay7:53 PM

    Frame automated findings with conservative exploitability and limitation notes.

    Next: Draft remediation notes from the normalized evidence.

    • Automated exploitability review is conservative and does not replace a manual exploitability assessment.
  7. Remediation draft

    Partial22 findings1.5s replay7:53 PM

    Prepare remediation-oriented evidence for the shareable report artifact.

    Next: Attach an operator review artifact before claiming human review.

    • Remediation notes are generated from detector evidence and require project-specific engineering review.
  8. Operator review

    Blocked0ms replay7:53 PM

    Record whether a human operator artifact exists before buyer escalation.

    Next: Attach a real operator review artifact before claiming human review.

    • No operator review artifact is attached to this automated scan.
    • Human operator review has not been attached to this automated scan yet.
  9. Finalization

    Partial22 findings620ms replay7:53 PM

    Publish the automated report artifact or explain why the scan failed closed.

    Next: Share the report with explicit limitations and review state.

    Artifact: Automated Solidity report · solidity-2f746d702f766567

    • Final report is an automated static-analysis artifact; no operator review artifact is attached.

Report badges

Verified source

Badges describe the evidence carried by this report artifact, not financial value or future pricing. Operator-reviewed is never granted automatically.

How to read this report

Score, confidence, ranking: four moving parts, no hand-tuning.

Generated Oct 3, 2026, 7:53 PM · Solidity · unchecked-call-king.sol

Score bands

  • 0-19

    AVOID-style triage

    Multiple high or critical findings, low source confidence, or unverified context. Public action should pause until a Private Review or a re-scan with better evidence.

  • 20-49

    High caution · this report

    Notable findings or thin evidence. Worth a Private Review before relying on the artifact.

  • 50-69

    Watch

    Mixed signals: some evidence, some gaps. Re-scan after material changes to the target.

  • 70-89

    Clear surface (automated)

    No critical or high findings via static analysis. Not a safety claim: human review is still recommended for diligence work.

  • 90-100

    Strong surface (automated)

    No critical or high findings, verified source, and high source confidence. Not a safety claim: human review is still recommended for diligence work.

Score
Deterministic 0-100 derived from severity counts. Same formula across every report. Lower means more risk.
Confidence
Separate axis. Measures how much VegaSec trusts the input data. Low confidence pushes the verdict toward UNKNOWN; the two are never collapsed into one number.
Ranking / percentile
Only meaningful within the eligible Trust Index set. Shown on /trust-index when the eligible pool is large enough. Today the public index is a controlled preview.

Private Review is separate

A paid Private Review does not raise the public score on this report. Public score reflects public-source evidence only. Private Review adds operator attestation and a confidential memo, never a score bump.

Export and share

  • · Shareable public URL: copy from the report actions panel.
  • · Markdown export: every export carries the report id, target, verdict, generated timestamp, and the public-data disclaimer.
  • · PDF export: not in this MVP. Tracked as a follow-up. The Markdown export contains the same content and prints cleanly to PDF from a browser today.

Source provenance

This report scanned a Solidity source provided directly by the submitter (paste). No on-chain address is associated.

Scanned source (6,001 chars)

/*
 * @source: etherscan.io 
 * @author: -
 * @vulnerable_at_lines: 201,213
 */

pragma solidity ^0.4.24;

contract PoCGame
{
    
    /**
     * Modifiers
     */
     
    modifier onlyOwner()
    {
        require(msg.sender == owner);
        _;
    }
    
   modifier isOpenToPublic()
    {
        require(openToPublic);
        _;
    }

    modifier onlyRealPeople()
    {
          require (msg.sender == tx.origin);
        _;
    }

    modifier  onlyPlayers()
    { 
        require (wagers[msg.sender] > 0); 
        _; 
    }
    
   
    /**
     * Events
     */
    event Wager(uint256 amount, address depositer);
    event Win(uint256 amount, address paidTo);
    event Lose(uint256 amount, address loser);
    event Donate(uint256 amount, address paidTo, address donator);
    event DifficultyChanged(uint256 currentDifficulty);
    event BetLimitChanged(uint256 currentBetLimit);

    /**
     * Global Variables
     */
    address private whale;
    uint256 betLimit;
    uint difficulty;
    uint private randomSeed;
    address owner;
    mapping(address => uint256) timestamps;
    mapping(address => uint256) wagers;
    bool openToPublic;
    uint256 totalDonated;

    /**
     * Constructor
     */
    constructor(address whaleAddress, uint256 wagerLimit) 
    onlyRealPeople()
    public 
    {
        openToPublic = false;
        owner = msg.sender;
        whale = whaleAddress;
        totalDonated = 0;
        betLimit = wagerLimit;
        
    }


    /**
     * Let the public play
     */
    function OpenToThePublic() 
    onlyOwner()
    public
    {
        openToPublic = true;
    }
    
    /**
     * Adjust the bet amounts
     */
    function AdjustBetAmounts(uint256 amount) 
    onlyOwner()
    public
    {
        betLimit = amount;
        
        emit BetLimitChanged(betLimit);
    }
    
     /**
     * Adjust the difficulty
     */
    function AdjustDifficulty(uint256 amount) 
    onlyOwner()
    public
    {
        difficulty = amount;
        
        emit DifficultyChanged(difficulty);
    }
    
    
    function() public payable { }

    /**
     * Wager your bet
     */
    function wager()
    isOpenToPublic()
    onlyRealPeople() 
    payable
    public 
    {
        //You have to send exactly 0.01 ETH.
        require(msg.value == betLimit);
        
        //You cannot wager multiple times
        require(wagers[msg.sender] == 0);

        //log the wager and timestamp(block number)
        timestamps[msg.sender] = block.number;
        wagers[msg.sender] = msg.value;
        emit Wager(msg.value, msg.sender);
    }
    
    /**
     * method to determine winners and losers
     */
    function play()
    isOpenToPublic()
    onlyRealPeople()
    onlyPlayers()
    public
    {
        uint256 blockNumber = timestamps[msg.sender];
        if(blockNumber < block.number)
        {
            timestamps[msg.sender] = 0;
            wagers[msg.sender] = 0;
    
            uint256 winningNumber = uint256(keccak256(abi.encodePacked(blockhash(blockNumber),  msg.sender)))%difficulty +1;
    
            if(winningNumber == difficulty / 2)
            {
                payout(msg.sender);
            }
            else 
            {
                //player loses
                loseWager(betLimit / 2);
            }    
        }
        else
        {
            revert();
        }
    }

    /**
     * For those that just want to donate to the whale
     */
    function donate()
    isOpenToPublic()
    public 
    payable
    {
        donateToWhale(msg.value);
    }

    /**
     * Payout ETH to winner
     */
    function payout(address winner) 
    internal 
    {
        uint256 ethToTransfer = address(this).balance / 2;
        
        winner.transfer(ethToTransfer);
        emit Win(ethToTransfer, winner);
    }

    /**
     * Payout ETH to whale
     */
    function donateToWhale(uint256 amount) 
    internal 
    {
        // <yes> <report> UNCHECKED_LL_CALLS
        whale.call.value(amount)(bytes4(keccak256("donate()")));
        totalDonated += amount;
        emit Donate(amount, whale, msg.sender);
    }

    /**
     * Payout ETH to whale when player loses
     */
    function loseWager(uint256 amount) 
    internal 
    {
        // <yes> <report> UNCHECKED_LL_CALLS
        whale.call.value(amount)(bytes4(keccak256("donate()")));
        totalDonated += amount;
        emit Lose(amount, msg.sender);
    }
    

    /**
     * ETH balance of contract
     */
    function ethBalance() 
    public 
    view 
    returns (uint256)
    {
        return address(this).balance;
    }
    
    
    /**
     * current difficulty of the game
     */
    function currentDifficulty() 
    public 
    view 
    returns (uint256)
    {
        return difficulty;
    }
    
    
    /**
     * current bet amount for the game
     */
    function currentBetLimit() 
    public 
    view 
    returns (uint256)
    {
        return betLimit;
    }
    
    function hasPlayerWagered(address player)
    public 
    view 
    returns (bool)
    {
        if(wagers[player] > 0)
        {
            return true;
        }
        else
        {
            return false;
        }
        
    }

    /**
     * For the UI to properly display the winner's pot
     */
    function winnersPot() 
    public 
    view 
    returns (uint256)
    {
        return address(this).balance / 2;
    }

    /**
     * A trap door for when someone sends tokens other than the intended ones so the overseers can decide where to send them.
     */
    function transferAnyERC20Token(address tokenAddress, address tokenOwner, uint tokens) 
    public 
    onlyOwner() 
    returns (bool success) 
    {
        return ERC20Interface(tokenAddress).transfer(tokenOwner, tokens);
    }
}

//Define ERC20Interface.transfer, so PoCWHALE can transfer tokens accidently sent to it.
contract ERC20Interface 
{
    function transfer(address to, uint256 tokens) public returns (bool success);
}

Public-data disclaimer

Solidity scans are triage based on slither + semgrep static analysis. Output is not a certification, audit attestation or financial advice. Findings can include false positives and may miss patterns the configured detectors do not cover.