time-manipulation-ether-lotto.sol
VSS-20261003-GA3J1GNL · generated Oct 3, 2026, 7:53 PM
Verdict is derived from severity counts via the same deterministic formula every VegaSec report uses. time-manipulation-ether-lotto.sol was scanned from pasted source. This is static-analysis triage, not a certification or formal audit attestation.
PDF artifact
Queued artifact pipeline · not blocking on the scan
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-GA3J1GNL/export.pdf
Solidity evidence report
7 audit findings
Severity distribution
Executive summary
- 7 findings surfaced (0 critical, 2 high, 1 medium, 1 low, 3 informational).
- HIGH · EtherLotto.play() (time-manipulation-ether-lotto.sol#33-57) sends eth to arbitrary user (play) — exploitability medium.
- HIGH · EtherLotto.play() (time-manipulation-ether-lotto.sol#33-57) uses a weak PRNG: "random = uint256(sha3()(block.timestamp)) % 2 (time-manipulation-ether-lotto.sol# (play) — exploitability medium.
- Automated static analysis only. A human operator review has not been attached to this report.
- highAccess controlConfidence: mediumExploitability: mediumDetector: slither
EtherLotto.play() (time-manipulation-ether-lotto.sol#33-57) sends eth to arbitrary user
Evidence
EtherLotto.play() (time-manipulation-ether-lotto.sol#33-57) sends eth to arbitrary user Dangerous calls: - bank.transfer(FEE_AMOUNT) (time-manipulation-ether-lotto.sol#49)
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.
- highOracle manipulationConfidence: mediumExploitability: mediumDetector: slither
EtherLotto.play() (time-manipulation-ether-lotto.sol#33-57) uses a weak PRNG: "random = uint256(sha3()(block.timestamp)) % 2 (time-manipulation-ether-lotto.sol#
Evidence
EtherLotto.play() (time-manipulation-ether-lotto.sol#33-57) uses a weak PRNG: "random = uint256(sha3()(block.timestamp)) % 2 (time-manipulation-ether-lotto.sol#43)"
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.
- mediumLogicConfidence: highExploitability: lowDetector: slither
EtherLotto.play() (time-manipulation-ether-lotto.sol#33-57) uses a dangerous strict equality:
Evidence
EtherLotto.play() (time-manipulation-ether-lotto.sol#33-57) uses a dangerous strict equality: - random == 0 (time-manipulation-ether-lotto.sol#46)
Exploitability notes
Low-severity finding even at higher confidence; unlikely to be directly exploitable.
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.
- lowTimestamp dependenceConfidence: mediumExploitability: mediumDetector: slither
EtherLotto.play() (time-manipulation-ether-lotto.sol#33-57) uses timestamp for comparisons
Evidence
EtherLotto.play() (time-manipulation-ether-lotto.sol#33-57) uses timestamp for comparisons Dangerous comparisons: - random == 0 (time-manipulation-ether-lotto.sol#46)
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.
- informationalLogicConfidence: highExploitability: lowDetector: slither
Version constraint ^0.4.15 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html)
Evidence
Version constraint ^0.4.15 contains known severe issues (https://solidity.readthedocs.io/en/latest/bugs.html) - DirtyBytesArrayToStorage - KeccakCaching - EmptyByteArrayCopy - DynamicArrayCleanup - ImplicitConstructorCallvalueCheck - TupleAssignmentMultiStackSlotComponents - MemoryArrayCreationOverflow - privateCanBeOverridden - SignedArrayStorageCopy - UninitializedFunctionPointerInConstructor_0.4.x - IncorrectEventSignatureInLibraries_0.4.x - ExpExponentCleanup - NestedArrayFunctionCallDecoder - ZeroFunctionSelector. It is used by: - ^0.4.15 (time-manipulation-ether-lotto.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.
- informationalReentrancyConfidence: mediumExploitability: lowDetector: slither
Reentrancy in EtherLotto.play() (time-manipulation-ether-lotto.sol#33-57):
Evidence
Reentrancy in EtherLotto.play() (time-manipulation-ether-lotto.sol#33-57): External calls: - bank.transfer(FEE_AMOUNT) (time-manipulation-ether-lotto.sol#49) - msg.sender.transfer(pot - FEE_AMOUNT) (time-manipulation-ether-lotto.sol#52) State variables written after the call(s): - pot = 0 (time-manipulation-ether-lotto.sol#55)
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.
- informationalLogicConfidence: highExploitability: lowDetector: slither
Deprecated standard detected random = uint256(sha3()(block.timestamp)) % 2 (time-manipulation-ether-lotto.sol#43):
Evidence
Deprecated standard detected random = uint256(sha3()(block.timestamp)) % 2 (time-manipulation-ether-lotto.sol#43): - Usage of "sha3()" should be replaced with "keccak256()"
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.
Exploit reasoning
Reference-grade reasoning tied to evidence
- c629ac5de3f1c3592e7741a7258c1c068a22f680147b99096d30d3277cc44ffc · access-controlhighConfidence: 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.
- 43fbd92bca62d552359163cb8d2da908850af12168c134ffe9157a782c5229bd · oracle-manipulationhighConfidence: 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.
- f9a7bd04d9f1975175210e202fe233599640a4395c8e17ae5e108c1c5c9db28a · logicmediumConfidence: low
Conditions are partial; exploit requires further evidence the analyzer did not produce.
Preconditions
- Application-specific invariant the analyzer flagged as possibly violated
Action
Operator review required to determine whether the flagged path is reachable and whether the impact materializes in this specific contract.
Impact
Depends on the specific invariant; impact assessment requires operator context.
False-positive caveats
- Logic flags are application-specific; the analyzer may have misread the intent.
- The flagged code path may be unreachable in production.
Remediation checklist
- Operator should manually validate the invariant the analyzer flagged.
- Add a unit test that exercises the suspected path.
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.
Audit intake
Passed320ms replay7:53 PMNormalize the submitted contract target and confirm it can enter the Solidity audit lane.
Source acquisition
Passed1.4s replay7:53 PMResolve pasted source or verified explorer source without treating malformed input as demo data.
Toolchain validation
Passed2.3s replay7:53 PMConfirm the configured static analyzers can run and produce parseable output.
Static analysis
Passed7 findings8.8s replay7:53 PMRun static analyzers against the sandboxed source and collect raw detector evidence.
Finding normalization
Passed7 findings1.1s replay7:53 PMDedupe detectors, classify vulnerability classes and compute severity-weighted risk.
Exploitability review
Partial7 findings1.9s replay7:53 PMFrame automated findings with conservative exploitability and limitation notes.
- Automated exploitability review is conservative and does not replace a manual exploitability assessment.
Remediation draft
Partial7 findings1.5s replay7:53 PMPrepare remediation-oriented evidence for the shareable report artifact.
- Remediation notes are generated from detector evidence and require project-specific engineering review.
Operator review
Blocked0ms replay7:53 PMRecord whether a human operator artifact exists before buyer escalation.
- No operator review artifact is attached to this automated scan.
- Human operator review has not been attached to this automated scan yet.
Finalization
Partial7 findings620ms replay7:53 PMPublish the automated report artifact or explain why the scan failed closed.
Artifact: Automated Solidity report · solidity-2f746d702f766567
- Final report is an automated static-analysis artifact; no operator review artifact is attached.
How to read this report
Score, confidence, ranking: four moving parts, no hand-tuning.
Generated Oct 3, 2026, 7:53 PM · Solidity · time-manipulation-ether-lotto.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.