• LISA
    LISA
    • Public Scans
    • My Scans
    1. Scan
    2. ...
    2025-06-22 14:46:24
    Public
    Full Disclosure

    QA Marketplace Contract

    medium4
    Created By:
    Credit Usage:

    Missing ReentrancyGuard initialization

    MEDIUM

    Description

    The initialize function does not call __ReentrancyGuard_init(), leaving the reentrancy protection uninitialized. This could allow reentrancy attacks in functions using the nonReentrant modifier.

    Recommendation

    Add __ReentrancyGuard_init(); in the initialize function to properly initialize the reentrancy guard.

    Affected Lines

    Line 111 – 119

    Anyone can process expired questions

    MEDIUM

    Description

    The processExpiredQuestion function is public and lacks access control, allowing anyone to trigger it for expired questions. This could disrupt the intended workflow and lead to premature state changes.

    Recommendation

    Add the onlyServer modifier to processExpiredQuestion to restrict access.

    Affected Lines

    Line 279 – 282

    Unvalidated answerer ID during question submission

    MEDIUM

    Description

    The submitQuestion function does not validate if the _answererId is registered. If the answerer never registers, rewards remain stuck in answererEarnings or pendingRewards, leading to lost funds.

    Recommendation

    Add checks to ensure _answererId is registered or enforce registration before question submission.

    Affected Lines

    Line 176 – 185

    Excess ETH in viewQuestion not refunded

    MEDIUM

    Description

    If users send more ETH than required in viewQuestion, the excess is not refunded, leading to overpayment and incorrect reward calculations.

    Recommendation

    Calculate the exact required amount and refund any excess ETH sent by the user.

    Affected Lines

    Line 314 – 318