Assessment reports>StaFi>Threat Models>setParams

Function: setParams(uint256 _unstakeFeeCommission, uint256 _protocolFeeCommission, uint256 _minStakeAmount, uint256 _unbondingDuration, uint256 _rateChangeLimit, uint256 _eraSeconds, uint256 _eraOffset)

Allows setting the params of the stake manager.

Inputs

  • _unstakeFeeCommission

    • Control: Fully controlled by the owner.

    • Constraints: Limited. Should be improved.

    • Impact: The unstake fee commission.

  • _protocolFeeCommission

    • Control: Fully controlled by the owner.

    • Constraints: Limited. Should be improved.

    • Impact: The protocol fee commission.

  • _minStakeAmount

    • Control: Fully controlled by the owner.

    • Constraints: Limited. Should be improved.

    • Impact: The minimum stake amount.

  • _unbondingDuration

    • Control: Fully controlled by the owner.

    • Constraints: Limited. Should be improved.

    • Impact: The unbonding duration.

  • _rateChangeLimit

    • Control: Fully controlled by the owner.

    • Constraints: Limited. Should be improved.

    • Impact: The rate change limit.

  • _eraSeconds

    • Control: Fully controlled by the owner.

    • Constraints: Limited. Should be improved.

    • Impact: The era seconds.

  • _eraOffset

    • Control: Fully controlled by the owner.

    • Constraints: Limited. Should be improved.

    • Impact: The era offset.

Branches and code coverage (including function calls)

Intended branches

  • All the parameters should be checked against either particular values or ranges. Currently not performed.

  • Set all necessary parameters. Update all states with the corresponding values.

  • Assumed that it can be called multiple times.

Negative behavior

  • Should not be callable by anyone other than the admin. Ensured through the onlyAdmin modifier.

Zellic © 2024Back to top ↑