• #A
    #B
    #C
    #D
    Explanation:
    Unbounded loops that depend on storage or user-controlled arrays can exhaust gas and render functions uncallable. Attackers can intentionally cause denial-of-service through loop amplification. Good design avoids external iteration
  • #A
    #B
    #C
    #D
    Explanation:
    String comparison requires hashing or byte-by-byte checks, both of which are expensive in the EVM model. It also introduces risk when mixed with packed encodings. Developers instead rely on enums or hashed IDs.
  • #A
    #B
    #C
    #D
    Explanation:
    Memory follows a quadratic cost function, meaning costs rise rapidly as the memory footprint grows. Careless array allocations can suddenly inflate execution cost. This is a frequent root cause of gas blowups in audits.
  • Shubhada Pande

    Shubhada Pande

    @ShubhadaJP1w

    Smart Contract QA & Testing Hub

    Your central hub for everything related to blockchain QA, including test coverage, CEI testing, flaky tests, mainnet/testnet mismatches, audit support, incident analysis, and how QA engineers grow into blockchain security...
    1
    Replies
  • #A
    #B
    #C
    #D
    Explanation:
    PUSH0 provides a zero literal without consuming calldata or memory. This reduces bytecode size and simplifies stack management. It's extremely helpful in tight loops and assembly-heavy contracts.
  • #A
    #B
    #C
    #D
    Explanation:
    State shadowing happens when a derived contract redeclares a state variable with the same name as a parent. This creates storage misalignment and unexpected slot overwrites. Auditors treat this as a major upgradeability and correctness risk.
  • #A
    #B
    #C
    #D
    Explanation:
    Calldata avoids copying user inputs into memory, significantly reducing gas usage for large payloads. Router contracts receive untrusted inputs, so avoiding memory expansion is both cheaper and safer. This is why AMMs and DEX routers heavily rely on calldata
  • 5
    Replies
  • #A
    #B
    #C
    #D
    Explanation:
    Silent reverts hide failure reasons, making debugging and validation difficult. They also open the door for inconsistent execution paths
  • #A
    #B
    #C
    #D
    Explanation:
    REVERT allows returning structured revert data back to the caller, which improves debugging and interface guarantees. INVALID terminates execution with no return payload. This distinction is crucial for protocols relying on bubble-up error messaging.
  • Difficulty - Medium
    Total Plays - 4
    Allowed Time - 10 sec
    Best time - 10 sec

    Why are multi-step writes risky?

    Tip: Click "Play" to reveal options and start playing.
    #A
    #B
    #C
    #D
    Explanation:
    Multi-step operations can leave the contract in a partially updated state if execution halts. Attackers exploit these interim states to bypass checks.
  • #A
    #B
    #C
    #D
    Explanation:
    EXTCODESIZE checks if the target has code deployed. It helps detect contracts vs EOAs in validation logic
  • #A
    #B
    #C
    #D
    Explanation:
    If the implementation contract is self-destructed, proxies break permanently or redirect unexpectedly. This creates bricked contracts and undefined behavior
  • Difficulty - Medium
    Total Plays - 4
    Allowed Time - 10 sec
    Best time - 10 sec

    What does RETURNDATASIZE prevent?

    Tip: Click "Play" to reveal options and start playing.
    #A
    #B
    #C
    #D
    Explanation:
    RETURNDATASIZE ensures the caller knows exactly how many bytes were returned. It prevents incorrect assumptions and truncation bugs during low-level calls.
  • 2
    Replies
Home Channels Search Login Register