Assessment reports>Session Token>Threat Model>Function: claimRewards()

Function: claimRewards()

The function claims staking rewards for the beneficiary, removes any unstaked service nodes from the investorServiceNodes, and transfers the claimed rewards to the beneficiary.

Branches and code coverage (including function calls)

Intended branches

Function call analysis

  • stakingRewardsContract.serviceNodes(investorServiceNodes[i - 1].serviceNodeID)

    • External/Internal? External.

    • Argument control: N/A.

    • Impact: The function retrieves service-node information from the stakingRewardsContract. After this function call, it checks the retrieved service-node information, and if it is confirmed that the service node has already been unstaked, it removes it from investorServiceNodes.

  • stakingRewardsContract.claimRewards()

    • External/Internal? External.

    • Argument control: N/A.

    • Impact: Claims rewards from the stakingRewardsContract.

  • SENT.safeTransfer(beneficiary, amount)

    • External/Internal? External.

    • Argument control: N/A.

    • Impact: Transfers the claimed rewards to the beneficiary.

Zellic © 2024Back to top ↑