VegaSec / Solidity scan report

gas-dos-list-dos.sol

VSS-20261003-6P6L4T06 · generated Oct 3, 2026, 8:07 PM

Clear surface · automated7 findings1 highPasted source1 warningsemgrep 1.163.0

Verdict is derived from severity counts via the same deterministic formula every VegaSec report uses. gas-dos-list-dos.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
07b19f2e213ac995...46a81ab3
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-6P6L4T06/export.pdf

Solidity evidence report

7 audit findings

critical: 0high: 1medium: 1low: 2informational: 3

Severity distribution

Executive summary

  • 7 findings surfaced (0 critical, 1 high, 1 medium, 2 low, 3 informational).
  • HIGH · Government (gas-dos-list-dos.sol#10-124) contract sets array length with a user-controlled value: (Government) — exploitability medium.
  • Automated static analysis only. A human operator review has not been attached to this report.

Warnings (1)

  • · Unmapped detector slither:cache-array-length — classified as 'other'
semgrep 1.163.0
  • highGas / DoSConfidence: mediumExploitability: mediumDetector: slither

    Government (gas-dos-list-dos.sol#10-124) contract sets array length with a user-controlled value:

    Affected location
    gas-dos-list-dos.sol:10-124 · Government
    Detector / source
    slither · slither:controlled-array-length

    Evidence

    Government (gas-dos-list-dos.sol#10-124) contract sets array length with a user-controlled value: - creditorAmounts.push(amount * 110 / 100) (gas-dos-list-dos.sol#59)

    Exploitability notes

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

    Remediation

    Cap loop bounds, paginate iteration, and ensure no user can grow a state structure the contract must traverse to make progress.

    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

    Government.lendGovernmentMoney(address) (gas-dos-list-dos.sol#31-86) ignores return value by corruptElite.send(this.balance) (gas-dos-list-dos.sol#40)

    Affected location
    gas-dos-list-dos.sol:31-86 · lendGovernmentMoney
    Detector / source
    slither · slither:unchecked-send

    Evidence

    Government.lendGovernmentMoney(address) (gas-dos-list-dos.sol#31-86) ignores return value by corruptElite.send(this.balance) (gas-dos-list-dos.sol#40)

    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.
  • lowTimestamp dependenceConfidence: mediumExploitability: mediumDetector: slither

    Government.lendGovernmentMoney(address) (gas-dos-list-dos.sol#31-86) uses timestamp for comparisons

    Affected location
    gas-dos-list-dos.sol:31-86 · lendGovernmentMoney
    Detector / source
    slither · slither:timestamp

    Evidence

    Government.lendGovernmentMoney(address) (gas-dos-list-dos.sol#31-86) uses timestamp for comparisons Dangerous comparisons: - lastTimeOfNewCredit + TWELVE_HOURS < block.timestamp (gas-dos-list-dos.sol#35)

    Exploitability notes

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

    Remediation

    Treat block.timestamp as a coarse value with miner influence; prefer block-number windows for short-term invariants and add tolerance bands.

    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

    Government.inheritToNextGeneration(address).nextGeneration (gas-dos-list-dos.sol#111) lacks a zero-check on :

    Affected location
    gas-dos-list-dos.sol:111 · nextGeneration
    Detector / source
    slither · slither:missing-zero-check

    Evidence

    Government.inheritToNextGeneration(address).nextGeneration (gas-dos-list-dos.sol#111) lacks a zero-check on : - corruptElite = nextGeneration (gas-dos-list-dos.sol#113)

    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.
  • informationalLogicConfidence: highExploitability: lowDetector: slither

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

    Affected location
    gas-dos-list-dos.sol:8 · ^0.4.0
    Detector / source
    slither · slither:solc-version

    Evidence

    Version constraint ^0.4.0 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) - DirtyBytesArrayToStorage - KeccakCaching - EmptyByteArrayCopy - DynamicArrayCleanup - TupleAssignmentMultiStackSlotComponents - MemoryArrayCreationOverflow - privateCanBeOverridden - IncorrectEventSignatureInLibraries_0.4.x - ExpExponentCleanup - NestedArrayFunctionCallDecoder - ZeroFunctionSelector - DelegateCallReturnValue - ECRecoverMalformedInput - SkipEmptyStringLiteral - ConstantOptimizerSubtraction - IdentityPrecompileReturnIgnored - HighOrderByteCleanStorage - OptimizerStaleKnowledgeAboutSHA3 - LibrariesNotCallableFromPayableFunctions. It is used by: - ^0.4.0 (gas-dos-list-dos.sol#8)

    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 Government.lendGovernmentMoney(address) (gas-dos-list-dos.sol#31-86):

    Affected location
    gas-dos-list-dos.sol:31-86 · lendGovernmentMoney
    Detector / source
    slither · slither:reentrancy-unlimited-gas

    Evidence

    Reentrancy in Government.lendGovernmentMoney(address) (gas-dos-list-dos.sol#31-86): External calls: - msg.sender.send(amount) (gas-dos-list-dos.sol#37) - creditorAddresses[creditorAddresses.length - 1].send(profitFromCrash) (gas-dos-list-dos.sol#39) - corruptElite.send(this.balance) (gas-dos-list-dos.sol#40) State variables written after the call(s): - creditorAddresses = new address[](0) (gas-dos-list-dos.sol#46) - creditorAmounts = new uint256[](0) (gas-dos-list-dos.sol#48) - lastCreditorPayedOut = 0 (gas-dos-list-dos.sol#42) - lastTimeOfNewCredit = block.timestamp (gas-dos-list-dos.sol#43) - profitFromCrash = 0 (gas-dos-list-dos.sol#44) - round += 1 (gas-dos-list-dos.sol#49)

    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.
  • informationalOtherConfidence: highExploitability: lowDetector: slither

    Loop condition i < creditorAmounts.length (gas-dos-list-dos.sol#94) should use cached array length instead of referencing `length` member of the storage array.

    Affected location
    gas-dos-list-dos.sol:94 · i < creditorAmounts.length
    Detector / source
    slither · slither:cache-array-length

    Evidence

    Loop condition i < creditorAmounts.length (gas-dos-list-dos.sol#94) should use cached array length instead of referencing `length` member of the storage array.

    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.

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

  • 08a562324030e945acc0021d2dbd851bed1581d76e8b321e39c1938e13167eda · gas-doshigh
    Confidence: low

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

    Preconditions

    • Loop over an unbounded data structure controlled by external input
    • Single attacker-controlled entry that grows the data structure

    Action

    Attacker grows the data structure until the loop consumes more gas than the block can hold, blocking the function for everyone.

    Impact

    Permanent denial of service on critical functions (withdrawals, claim, settle).

    False-positive caveats

    • The loop may be bounded by other invariants the analyzer cannot prove.
    • Pagination or pull-based design may mitigate the issue at a higher layer.

    Remediation checklist

    • Replace the unbounded loop with a pull-based or paginated pattern.
    • Cap the data structure growth at the entry point with a documented limit.
    • Add a stress test asserting the loop terminates under adversarial input.
  • 2538852855aa3fb113658ae70603d0338374319dd325db91984ef4f727414a02 · 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 replay8:07 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 replay8:07 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 replay8:07 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

    Partial7 findings8.8s replay8:07 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

    Passed7 findings1.1s replay8:07 PM

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

    Next: Review exploitability conservatively against confidence and limitations.

  6. Exploitability review

    Partial7 findings1.9s replay8:07 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

    Partial7 findings1.5s replay8:07 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 replay8:07 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

    Partial7 findings620ms replay8:07 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, 8:07 PM · Solidity · gas-dos-list-dos.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

    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) · this report

    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 (4,903 chars)

/*
 * @source: https://etherscan.io/address/0xf45717552f12ef7cb65e95476f217ea008167ae3#code
 * @author: -
 * @vulnerable_at_lines: 46,48
 */

//added pragma version
pragma solidity ^0.4.0;

contract Government {

     // Global Variables
     uint32 public lastCreditorPayedOut;
     uint public lastTimeOfNewCredit;
     uint public profitFromCrash;
     address[] public creditorAddresses;
     uint[] public creditorAmounts;
     address public corruptElite;
     mapping (address => uint) buddies;
     uint constant TWELVE_HOURS = 43200;
     uint8 public round;

     function Government() {
         // The corrupt elite establishes a new government
         // this is the commitment of the corrupt Elite - everything that can not be saved from a crash
         profitFromCrash = msg.value;
         corruptElite = msg.sender;
         lastTimeOfNewCredit = block.timestamp;
     }

     function lendGovernmentMoney(address buddy) returns (bool) {
         uint amount = msg.value;
         // check if the system already broke down. If for 12h no new creditor gives new credit to the system it will brake down.
         // 12h are on average = 60*60*12/12.5 = 3456
         if (lastTimeOfNewCredit + TWELVE_HOURS < block.timestamp) {
             // Return money to sender
             msg.sender.send(amount);
             // Sends all contract money to the last creditor
             creditorAddresses[creditorAddresses.length - 1].send(profitFromCrash);
             corruptElite.send(this.balance);
             // Reset contract state
             lastCreditorPayedOut = 0;
             lastTimeOfNewCredit = block.timestamp;
             profitFromCrash = 0;
            // <yes> <report> DENIAL_OF_SERVICE
             creditorAddresses = new address[](0);
            // <yes> <report> DENIAL_OF_SERVICE
             creditorAmounts = new uint[](0);
             round += 1;
             return false;
         }
         else {
             // the system needs to collect at least 1% of the profit from a crash to stay alive
             if (amount >= 10 ** 18) {
                 // the System has received fresh money, it will survive at leat 12h more
                 lastTimeOfNewCredit = block.timestamp;
                 // register the new creditor and his amount with 10% interest rate
                 creditorAddresses.push(msg.sender);
                 creditorAmounts.push(amount * 110 / 100);
                 // now the money is distributed
                 // first the corrupt elite grabs 5% - thieves!
                 corruptElite.send(amount * 5/100);
                 // 5% are going into the economy (they will increase the value for the person seeing the crash comming)
                 if (profitFromCrash < 10000 * 10**18) {
                     profitFromCrash += amount * 5/100;
                 }
                 // if you have a buddy in the government (and he is in the creditor list) he can get 5% of your credits.
                 // Make a deal with him.
                 if(buddies[buddy] >= amount) {
                     buddy.send(amount * 5/100);
                 }
                 buddies[msg.sender] += amount * 110 / 100;
                 // 90% of the money will be used to pay out old creditors
                 if (creditorAmounts[lastCreditorPayedOut] <= address(this).balance - profitFromCrash) {
                     creditorAddresses[lastCreditorPayedOut].send(creditorAmounts[lastCreditorPayedOut]);
                     buddies[creditorAddresses[lastCreditorPayedOut]] -= creditorAmounts[lastCreditorPayedOut];
                     lastCreditorPayedOut += 1;
                 }
                 return true;
             }
             else {
                 msg.sender.send(amount);
                 return false;
             }
         }
     }

     // fallback function
     function() {
         lendGovernmentMoney(0);
     }

     function totalDebt() returns (uint debt) {
         for(uint i=lastCreditorPayedOut; i<creditorAmounts.length; i++){
             debt += creditorAmounts[i];
         }
     }

     function totalPayedOut() returns (uint payout) {
         for(uint i=0; i<lastCreditorPayedOut; i++){
             payout += creditorAmounts[i];
         }
     }

     // better don't do it (unless you are the corrupt elite and you want to establish trust in the system)
     function investInTheSystem() {
         profitFromCrash += msg.value;
     }

     // From time to time the corrupt elite inherits it's power to the next generation
     function inheritToNextGeneration(address nextGeneration) {
         if (msg.sender == corruptElite) {
             corruptElite = nextGeneration;
         }
     }

     function getCreditorAddresses() returns (address[]) {
         return creditorAddresses;
     }

     function getCreditorAmounts() returns (uint[]) {
         return creditorAmounts;
     }
 }

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.