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

Function: addBLSPublicKey()

The function allows multiple blsPubKey to be added to the stakingRewardsContract and managed within the investorServiceNodes array.

Inputs

  • blsPubkey

    • Validation: N/A.

    • Impact: A parameter used to add service-node information to the stakingRewardsContract contract.

  • blsSignature

    • Validation: N/A.

    • Impact: A parameter used to add service-node information to the stakingRewardsContract contract.

  • serviceNodeParams

    • Validation: N/A.

    • Impact: A parameter used to add service-node information to the stakingRewardsContract contract.

Branches and code coverage (including function calls)

Intended branches

Negative behavior

Function call analysis

  • investorServiceNodes.push(ServiceNode(serviceNodeID, stakingRequirement))

    • External/Internal? Internal.

    • Argument control: N/A.

    • Impact: Adds the information of the service node to be added to investorServiceNodes.

  • SENT.approve(address(stakingRewardsContract), stakingRequirement);

    • External/Internal? External.

    • Argument control: N/A.

    • Impact: Approves the amount of SENT tokens to be staked in the stakingRewardsContract.

  • stakingRewardsContract.addBLSPublicKey(blsPubkey, blsSignature, serviceNodeParams, contributors);

    • External/Internal? External.

    • Argument control: blsPubkey and serviceNodeParams.

    • Impact: Adds BLS public key and other data to the stakingRewardsContract.

Zellic © 2024Back to top ↑