TW
Tripwire
Find contracts. Test them. Review real vulns.

Analysis Run

3ecd3676-57cf-41dd-a561-77a66ce65b74

failed
Chain ID
1
Address
Block Number
Created
Sun, Dec 28, 2025 1:28 PM
Review Summary

What survived the funnel

Open this run to answer one question: is this real attacker-relevant behavior with real impact, or just normal contract plumbing?

Confirmed
0
Validated
0
Source
Verified
Review Backing
Not yet
Best current signal
Untrusted DELEGATECALL target reachable
crit 0 high 0 direct contract
Review Checklist
1. Read the findings table first. Ignore raw jobs until the result looks real.
2. Confirm attacker control, not just the existence of a sink.
3. Confirm money or privilege impact.
4. Keep it if the behavior is real. Kill it if this is normal proxy, admin, or upgrade plumbing.

Processing Jobs

Status & attempts
ID Type Status Attempts Heartbeat
30295 report.consolidate complete 1 / 1 3 months ago
73954 artifact.fetch failed 1 / 3 1 week ago
73955 tool.cast_disasm complete 1 / 3 1 week ago
73956 analysis.bundle complete 1 / 3 1 week ago
73957 capability.graph complete 1 / 3 1 week ago
73958 detector.run complete 1 / 3 1 week ago
73959 validation.fork complete 1 / 3 1 week ago

Artifact

Runtime bytecode: available
Creation TX:
Deployer:
Proxy: no
Implementation:
Verified Source: yes

Slither

tool.slither

No slither job recorded yet.

Codex

report.consolidate
Job Status
complete
Attempts
1 / 1
Findings
0
No findings?
yes
Summary
No exploitable vulnerabilities identified in the scoped first-party contracts; remaining risks are primarily trust/operational (admin-controlled parameters and off-chain merkle generation).
View stderr
[codex:1520973] OpenAI Codex v0.77.0 (research preview)
[codex:1520973] --------
[codex:1520973] workdir: /tmp/codex-multi-5p4yzvnm
[codex:1520973] model: gpt-5.2-codex
[codex:1520973] provider: openai
[codex:1520973] approval: never
[codex:1520973] sandbox: read-only
[codex:1520973] reasoning effort: xhigh
[codex:1520973] reasoning summaries: auto
[codex:1520973] session id: 019b651d-bc62-7183-a5d1-dffcc4d3b524
[codex:1520973] --------
[codex:1520973] user
[codex:1520973] You are a security auditor. Audit this Solidity codebase for exploitable vulnerabilities.
[codex:1520973] Focus on: reentrancy, access control, upgradeability/proxy issues, signature validation, oracle manipulation,
[codex:1520973] accounting/invariant breaks, external call patterns, unchecked return values, and dangerous delegatecall.
[codex:1520973] 
[codex:1520973] Scope rules:
[codex:1520973] - You MUST fully read `AUDIT_BUNDLE.txt` before concluding. It contains the complete contents of all first-party `contracts/**/*.sol` files.
[codex:1520973] - Treat `lib/` and `@openzeppelin/` as third-party dependencies; skip them unless there is a concrete misuse angle in first-party code.
[codex:1520973] 
[codex:1520973] Output MUST be valid JSON matching the provided schema.
[codex:1520973] - If you find nothing meaningful: set no_findings=true and findings=[].
[codex:1520973] - Otherwise: set no_findings=false and include findings with severity/category/title and file/line locations when possible.
[codex:1520973] 
[codex:1520973] Output constraints (IMPORTANT):
[codex:1520973] - severity MUST be exactly one of: info, low, medium, high, critical (lowercase).
[codex:1520973] - category MUST be exactly one of: access_control, reentrancy, math, oracle, upgradeability, auth, other.
[codex:1520973] mcp startup: no servers
[codex:1520973] 
[codex:1520973] thinking
[codex:1520973] **Checking for instructions and skills**
[codex:1520973] exec
[codex:1520973] /bin/bash -lc ls in /tmp/codex-multi-5p4yzvnm succeeded in 6ms:
[codex:1520973] AUDIT_BUNDLE.txt
[codex:1520973] codex-output-schema.json
[codex:1520973] contracts
[codex:1520973] 
[codex:1520973] thinking
[codex:1520973] **Searching for AUDIT_BUNDLE**
[codex:1520973] exec
[codex:1520973] /bin/bash -lc 'cat AUDIT_BUNDLE.txt' in /tmp/codex-multi-5p4yzvnm succeeded in 7ms:
[codex:1520973] This file concatenates the full contents of first-party Solidity sources for auditing.
[codex:1520973] 
[codex:1520973] ================================================================================
[codex:1520973] FILE: contracts/lib/openzeppelin-contracts/contracts/utils/Context.sol
[codex:1520973] ================================================================================
[codex:1520973] // SPDX-License-Identifier: MIT
[codex:1520973] // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
[codex:1520973] 
[codex:1520973] pragma solidity ^0.8.20;
[codex:1520973] 
[codex:1520973] /**
[codex:1520973]  * @dev Provides information about the current execution context, including the
[codex:1520973]  * sender of the transaction and its data. While these are generally available
[codex:1520973]  * via msg.sender and msg.data, they should not be accessed in such a direct
[codex:1520973]  * manner, since when dealing with meta-transactions the account sending and
[codex:1520973]  * paying for execution may not be the actual sender (as far as an application
[codex:1520973]  * is concerned).
[codex:1520973]  *
[codex:1520973]  * This contract is only required for intermediate, library-like contracts.
[codex:1520973]  */
[codex:1520973] 
[codex:1520973] thinking
[codex:1520973] **Planning contract vulnerability audit**
[codex:1520973] exec
[codex:1520973] /bin/bash -lc 'rg -n "''^FILE: contracts/src" AUDIT_BUNDLE.txt' in /tmp/codex-multi-5p4yzvnm succeeded in 6ms:
[codex:1520973] 3978:FILE: contracts/src/LegionPreLiquidSaleV2.sol
[codex:1520973] 4323:FILE: contracts/src/LegionSale.sol
[codex:1520973] 5154:FILE: contracts/src/interfaces/ILegionAddressRegistry.sol
[codex:1520973] 5206:FILE: contracts/src/interfaces/ILegionLinearVesting.sol
[codex:1520973] 5284:FILE: contracts/src/interfaces/ILegionPreLiquidSaleV2.sol
[codex:1520973] 5409:FILE: contracts/src/interfaces/ILegionSale.sol
[codex:1520973] 5760:FILE: contracts/src/interfaces/factories/ILegionVestingFactory.sol
[codex:1520973] 5814:FILE: contracts/src/utils/Constants.sol
[codex:1520973] 5875:FILE: contracts/src/utils/Errors.sol
[codex:1520973] 
[codex:1520973] thinking
[codex:1520973] **Preparing to extract main contracts**
[codex:1520973] exec
[codex:1520973] /bin/bash -lc "sed -n '3978,4322p' AUDIT_BUNDLE.txt" in /tmp/codex-multi-5p4yzvnm succeeded in 7ms:
[codex:1520973] FILE: contracts/src/LegionPreLiquidSaleV2.sol
[codex:1520973] ================================================================================
[codex:1520973] // SPDX-License-Identifier: MIT
[codex:1520973] pragma solidity 0.8.28;
[codex:1520973] 
[codex:1520973] //       ___       ___           ___                       ___           ___
[codex:1520973] //      /\__\     /\  \         /\  \          ___        /\  \         /\__\
[codex:1520973] //     /:/  /    /::\  \       /::\  \        /\  \      /::\  \       /::|  |
[codex:1520973] //    /:/  /    /:/\:\  \     /:/\:\  \       \:\  \    /:/\:\  \     /:|:|  |
[codex:1520973] //   /:/  /    /::\~\:\  \   /:/  \:\  \      /::\__\  /:/  \:\  \   /:/|:|  |__
[codex:1520973] //  /:/__/    /:/\:\ \:\__\ /:/__/_\:\__\  __/:/\/__/ /:/__/ \:\__\ /:/ |:| /\__\
[codex:1520973] //  \:\  \    \:\~\:\ \/__/ \:\  /\ \/__/ /\/:/  /    \:\  \ /:/  / \/__|:|/:/  /
[codex:1520973] //   \:\  \    \:\ \:\__\    \:\ \:\__\   \::/__/      \:\  /:/  /      |:/:/  /
[codex:1520973] //    \:\  \    \:\ \/__/     \:\/:/  /    \:\__\       \:\/:/  /       |::/  /
[codex:1520973] //     \:\__\    \:\__\        \::/  /      \/__/        \::/  /        /:/  /
[codex:1520973] //      \/__/     \/__/         \/__/                     \/__/         \/__/
[codex:1520973] //
[codex:1520973] // If you find a bug, please contact security[at]legion.cc
[codex:1520973] // We will pay a fair bounty for any issue that puts users' funds at risk.
[codex:1520973] 
[codex:1520973] 
[codex:1520973] thinking
[codex:1520973] **Preparing for next LegionSale**
[codex:1520973] exec
[codex:1520973] /bin/bash -lc "sed -n '4323,5153p' AUDIT_BUNDLE.txt" in /tmp/codex-multi-5p4yzvnm succeeded in 5ms:
[codex:1520973] FILE: contracts/src/LegionSale.sol
[codex:1520973] ================================================================================
[codex:1520973] // SPDX-License-Identifier: MIT
[codex:1520973] pragma solidity 0.8.28;
[codex:1520973] 
[codex:1520973] //       ___       ___           ___                       ___           ___
[codex:1520973] //      /\__\     /\  \         /\  \          ___        /\  \         /\__\
[codex:1520973] //     /:/  /    /::\  \       /::\  \        /\  \      /::\  \       /::|  |
[codex:1520973] //    /:/  /    /:/\:\  \     /:/\:\  \       \:\  \    /:/\:\  \     /:|:|  |
[codex:1520973] //   /:/  /    /::\~\:\  \   /:/  \:\  \      /::\__\  /:/  \:\  \   /:/|:|  |__
[codex:1520973] //  /:/__/    /:/\:\ \:\__\ /:/__/_\:\__\  __/:/\/__/ /:/__/ \:\__\ /:/ |:| /\__\
[codex:1520973] //  \:\  \    \:\~\:\ \/__/ \:\  /\ \/__/ /\/:/  /    \:\  \ /:/  / \/__|:|/:/  /
[codex:1520973] //   \:\  \    \:\ \:\__\    \:\ \:\__\   \::/__/      \:\  /:/  /      |:/:/  /
[codex:1520973] //    \:\  \    \:\ \/__/     \:\/:/  /    \:\__\       \:\/:/  /       |::/  /
[codex:1520973] //     \:\__\    \:\__\        \::/  /      \/__/        \::/  /        /:/  /
[codex:1520973] //      \/__/     \/__/         \/__/                     \/__/         \/__/
[codex:1520973] //
[codex:1520973] // If you find a bug, please contact security[at]legion.cc
[codex:1520973] // We will pay a fair bounty for any issue that puts users' funds at risk.
[codex:1520973] 
[codex:1520973] 
[codex:1520973] 
[codex:1520973] thinking
[codex:1520973] **Reviewing contract reentrancy and signature logic**
[codex:1520973] thinking
[codex:1520973] **Evaluating initialization and interface structures**
[codex:1520973] 
[codex:1520973] I'll review initialization security concerns around the external initialize function and verify interface definitions in ILegionSale and ILegionPreLiquidSale to better understand the data structures involved.
[codex:1520973] exec
[codex:1520973] /bin/bash -lc "sed -n '5284,5409p' AUDIT_BUNDLE.txt" in /tmp/codex-multi-5p4yzvnm succeeded in 6ms:
[codex:1520973] FILE: contracts/src/interfaces/ILegionPreLiquidSaleV2.sol
[codex:1520973] ================================================================================
[codex:1520973] // SPDX-License-Identifier: MIT
[codex:1520973] pragma solidity 0.8.28;
[codex:1520973] 
[codex:1520973] //       ___       ___           ___                       ___           ___
[codex:1520973] //      /\__\     /\  \         /\  \          ___        /\  \         /\__\
[codex:1520973] //     /:/  /    /::\  \       /::\  \        /\  \      /::\  \       /::|  |
[codex:1520973] //    /:/  /    /:/\:\  \     /:/\:\  \       \:\  \    /:/\:\  \     /:|:|  |
[codex:1520973] //   /:/  /    /::\~\:\  \   /:/  \:\  \      /::\__\  /:/  \:\  \   /:/|:|  |__
[codex:1520973] //  /:/__/    /:/\:\ \:\__\ /:/__/_\:\__\  __/:/\/__/ /:/__/ \:\__\ /:/ |:| /\__\
[codex:1520973] //  \:\  \    \:\~\:\ \/__/ \:\  /\ \/__/ /\/:/  /    \:\  \ /:/  / \/__|:|/:/  /
[codex:1520973] //   \:\  \    \:\ \:\__\    \:\ \:\__\   \::/__/      \:\  /:/  /      |:/:/  /
[codex:1520973] //    \:\  \    \:\ \/__/     \:\/:/  /    \:\__\       \:\/:/  /       |::/  /
[codex:1520973] //     \:\__\    \:\__\        \::/  /      \/__/        \::/  /        /:/  /
[codex:1520973] //      \/__/     \/__/         \/__/                     \/__/         \/__/
[codex:1520973] //
[codex:1520973] // If you find a bug, please contact security[at]legion.cc
[codex:1520973] // We will pay a fair bounty for any issue that puts users' funds at risk.
[codex:1520973] 
[codex:1520973] exec
[codex:1520973] /bin/bash -lc "sed -n '5409,5760p' AUDIT_BUNDLE.txt" in /tmp/codex-multi-5p4yzvnm succeeded in 6ms:
[codex:1520973] FILE: contracts/src/interfaces/ILegionSale.sol
[codex:1520973] ================================================================================
[codex:1520973] // SPDX-License-Identifier: MIT
[codex:1520973] pragma solidity 0.8.28;
[codex:1520973] 
[codex:1520973] //       ___       ___           ___                       ___           ___
[codex:1520973] //      /\__\     /\  \         /\  \          ___        /\  \         /\__/
[codex:1520973] //     /:/  /    /::\  \       /::\  \        /\  \      /::\  \       /::|  |
[codex:1520973] //    /:/  /    /:/\:\  \     /:/\:\  \       \:\  \    /:/\:\  \     /:|:|  |
[codex:1520973] //   /:/  /    /::\~\:\  \   /:/  \:\  \      /::\__\  /:/  \:\  \   /:/|:|  |__
[codex:1520973] //  /:/__/    /:/\:\ \:\__\ /:/__/_\:\__\  __/:/\/__/ /:/__/ \:\__\ /:/ |:| /\__/
[codex:1520973] //  \:\  \    \:\~\:\ \/__/ \:\  /\ \/__/ /\/:/  /    \:\  \ /:/  / \/__|:|/:/  /
[codex:1520973] //   \:\  \    \:\ \:\__\    \:\ \:\__\   \::/__/      \:\  /:/  /      |:/:/  /
[codex:1520973] //    \:\  \    \:\ \/__/     \:\/:/  /    \:\__\       \:\/:/  /       |::/  /
[codex:1520973] //     \:\__\    \:\__\        \::/  /      \/__/        \::/  /        /:/  /
[codex:1520973] //      \/__/     \/__/         \/__/                     \/__/         \/__/
[codex:1520973] //
[codex:1520973] // If you find a bug, please contact security[at]legion.cc
[codex:1520973] // We will pay a fair bounty for any issue that puts users' funds at risk.
[codex:1520973] 
[codex:1520973] 
[codex:1520973] 
[codex:1520973] 
[codex:1520973] 
[codex:1520973] 
[codex:1520973] 
[codex:1520973] 
[codex:1520973] thinking
[codex:1520973] **Analyzing vulnerabilities in first-party sale contracts**
[codex:1520973] 
[codex:1520973] I'm carefully reviewing key sale contract functions—invest, refund, token claiming, capital withdrawal—and their checks for signatures, sale states, merkle proofs, and token handling. I'm looking for common security flaws like reentrancy, missing access controls, unchecked balances, overridable merkle roots, signature reuse, and potential denial-of-service issues, as well as subtle logic bugs in sale cancellation and funds flow. There's a lot here! I'll continue verifying state updates around external calls, sale lifecycle enforcement, and signature validation to determine realistic exploit paths or design risks.
[codex:1520973] thinking
[codex:1520973] **Evaluating sale lifecycle and state update risks**
[codex:1520973] 
[codex:1520973] I'm tracing how accepted capital roots can be set anytime, letting investors withdraw excess early, which might disrupt sale accounting but seems intended. There’s concern about refunded investors potentially claiming tokens since claim logic lacks a hasRefunded check, posing an operational risk if merkle roots aren’t carefully built. Also, vesting factory calls might lead to token loss if misconfigured, and some admin actions lack guards, though they require trusted roles. These intricacies make me wonder if some gaps lean more toward admin risks than straightforward vulnerabilities, yet I’m carefully weighing possible exploit angles related to timing and state consistency.
[codex:1520973] thinking
[codex:1520973] **Analyzing subtle logic and configuration risks**
[codex:1520973] 
[codex:1520973] I'm reviewing detailed nuances like reentrancy protections, signature handling, and sale timing checks; most flows update state before external calls, so seem solid against reentrancy. However, I note some configuration vulnerabilities, such as unchecked fee basis points that could lock funds by causing calculation underflows, and the lack of startTime enforcement enabling investment before sale officially begins. There are also operational quirks like potential vesting factory calls and signature replay possibilities, but nothing clearly exploitable emerges beyond these subtle risks.
[codex:1520973] thinking
[codex:1520973] **Examining off-chain data dependencies and state inconsistencies**
[codex:1520973] 
[codex:1520973] I'm tracing potential issues where off-chain-managed merkle roots and on-chain flags interact, like refunded investors still able to claim tokens if the root isn’t updated properly, and how multiple accepted capital roots might cause inconsistencies. There’s also signature replay potential since signatures lack nonce or expiration, enabling unlimited invests if leaked. Most risks stem from admin-controlled parameters and off-chain assumptions rather than direct on-chain vulnerabilities.
[codex:1520973] thinking
[codex:1520973] **Checking state management and edge cases**
[codex:1520973] 
[codex:1520973] I'm exploring possible issues with repeated merkle root updates, lack of pausing on some admin functions, refund timing oddities, and interactions allowing project withdrawal before token supply that might leave investors stuck. I’m also looking at reentrancy potential with token transfers, signature replay risks without nonce, and how vestingAddress handling might cause failures. Most concerns stem from edge cases or design trade-offs rather than clear exploits.
[codex:1520973] thinking
[codex:1520973] **Evaluating numeric logic and upgrade risks**
[codex:1520973] 
[codex:1520973] I'm reviewing arithmetic around token distribution rates, signature reuse risks without nonces, and potential upgradeability issues like missing storage gaps. I’m weighing minor concerns about zero-amount investments and admin controls but haven't found definite exploitable problems. Overall, no critical issues appear evident.
[codex:1520973] thinking
[codex:1520973] **Preparing final output**
[codex:1520973] codex
[codex:1520973] {"no_findings":true,"summary":"No exploitable vulnerabilities identified in the scoped first-party contracts; remaining risks are primarily trust/operational (admin-controlled parameters and off-chain merkle generation).","findings":[]}
[codex:1520973] tokens used
[codex:1520973] 56,651
[codex:1520973] {"no_findings":true,"summary":"No exploitable vulnerabilities identified in the scoped first-party contracts; remaining risks are primarily trust/operational (admin-controlled parameters and off-chain merkle generation).","findings":[]}
Metadata
{
    "codex": {
        "ran_at": "2025-12-28T13:28:26.209934+00:00",
        "returncode": 0
    },
    "summary": "No exploitable vulnerabilities identified in the scoped first-party contracts; remaining risks are primarily trust/operational (admin-controlled parameters and off-chain merkle generation).",
    "raw_final": {
        "summary": "No exploitable vulnerabilities identified in the scoped first-party contracts; remaining risks are primarily trust/operational (admin-controlled parameters and off-chain merkle generation).",
        "findings": [],
        "no_findings": true
    },
    "no_findings": true,
    "schema_version": 1
}

Opcode Heuristics

tool.cast_disasm
Delegatecall
1
Selfdestruct
0
CREATE2
0
CALL-family (heavy)
0
EXT*/BALANCE
0
Total opcodes
23
Flags
delegatecall_present
View cast disassembly output
00000000: RETURNDATASIZE
00000001: RETURNDATASIZE
00000002: RETURNDATASIZE
00000003: RETURNDATASIZE
00000004: CALLDATASIZE
00000005: RETURNDATASIZE
00000006: RETURNDATASIZE
00000007: CALLDATACOPY
00000008: CALLDATASIZE
00000009: RETURNDATASIZE
0000000a: PUSH20 0x11077eddfc6db5abfdb9e019a64172b5d8e81a3a
0000001f: GAS
00000020: DELEGATECALL
00000021: RETURNDATASIZE
00000022: RETURNDATASIZE
00000023: SWAP4
00000024: DUP1
00000025: RETURNDATACOPY
00000026: PUSH1 0x2a
00000028: JUMPI
00000029: REVERT
0000002a: JUMPDEST
0000002b: RETURN

Findings

validated = confirmed for call sinks; sink observed for others
Severity Category Tool Title Confidence Validated Confirmed Details
critical upgradeability detector Untrusted DELEGATECALL target reachable 70 no no
view
trace_id: 0x4a6b85d74b13c4e91b8f8e68f2f5d4298d25bd2385887a69bceca9a611ddbc14
call_targets: 0x11077eddfc6db5abfdb9e019a64172b5d8e81a3a
target_varies: no
classification: constant_target
validation_json
{
    "sink": "DELEGATECALL",
    "errors": 0,
    "status": "sink_reached",
    "attempts": 1,
    "trace_id": "0x4a6b85d74b13c4e91b8f8e68f2f5d4298d25bd2385887a69bceca9a611ddbc14",
    "confirmed": false,
    "trace_mode": "callTracer",
    "call_targets": [
        "0x11077eddfc6db5abfdb9e019a64172b5d8e81a3a"
    ],
    "matched_probe": null,
    "target_varies": false,
    "classification": "constant_target"
}
witness_json
{
    "notes": "heuristic witness; entrypoints are best-effort selectors with zeroed calldata",
    "constraints": [],
    "entrypoints": [
        {
            "calldata": "0x",
            "selector": "fallback",
            "calldata_variants": [
                "0x"
            ]
        }
    ]
}
evidence_json
{
    "examples": [
        {
            "pc": 32,
            "opcode": "DELEGATECALL",
            "returndata_checked": null,
            "value_expression_category": "n/a",
            "target_expression_category": "computed"
        }
    ],
    "guards_detected": [],
    "delegatecall_count": 1,
    "untrusted_delegatecall_count": 1
}
medium upgradeability cast DELEGATECALL present 80 no
view
evidence_json
{
    "notes": "delegatecall enables execution in caller context; common in proxies/upgradeable patterns",
    "delegatecall_count": 1
}