sechub
HomeServicesAssetsJobsFindingsTicketsGovCheck
Guest Mode. Click here to sign in and access all features

    Add input sanitisation for `STAKING_TERM`

    Holoride: DeFi Token

    Severity
    Informational
    Status
    Fixed
    Location(s)

    https://github.com/sub7security/holoride-defi/blob/0557444ec0b3a4df44e0cf6c9bcd8e06eaea63c4/contracts/Staking.sol#L56

    Description

    STAKING\_TERM is used to determine how long a token should be staked, before rewards are given. If this value is set to too large, no stakers can receive rewards in a reasonable timespan. This means that the reward tokens can potentially be stuck in the contract, since reward tokens can only be withdrawn by a staker who has staked the duration of STAKING\_TERM.

    Recommendation

    Consider restricting STAKING\_TERM to a reasonable timespan. For example, require(\_stakingTerm < 1 year in the constructor to prevent admin mistake.

    Comments
    No comments yet

    Add input sanitisation for `STAKING_TERM`

    Holoride: DeFi Token

    Severity
    Informational
    Status
    Fixed