Gulyabani

demo-vault-reentrancy.sol

Verdict

Triangle with an exclamation mark Findings by these rules

2 thing(s) in this contract match known risky patterns. Each one is listed below with the lines that triggered it.

AI court skipped: --no-ai was used, so the flagged lines were not reviewed by the AI court.

What to do

Read the flagged lines and have a person who knows Solidity review them before you use this contract.

Findings

  1. Sensitive function without a caller check (access_control)

    In plain words: A function that looks sensitive, such as one that moves funds or changes settings, may be callable by anyone, because no check on the caller was found.

    • Severity: low
    • Confidence: uncertain
    • Where: demo-vault-reentrancy.sol:12
    Evidence
    12    function withdraw() external {
  2. State changed after an external call (reentrancy)

    In plain words: State is changed after an external call, so a called contract could re-enter this function before the update and may see or use old values.

    • Severity: high
    • Confidence: likely
    • Where: demo-vault-reentrancy.sol:14-16
    Evidence
    14        (bool ok, ) = msg.sender.call{value: amount}("");16        balances[msg.sender] = 0;

What this check did not look at

A contract whose source raises nothing can still be part of any of these.

Coverage

About this scan

Name
demo-vault-reentrancy.sol
Subject
Solidity contract (source text only)