Assessment reports>StakeKit FeeWrapper>Threat Model>addFeeConfig

Function: addFeeConfig(address depositContract, address depositToken, uint16 fee, bool enabled, address feeRecipient, uint16 providerFee)

This function is used to add a new fee configuration with a fee recipient. This function can only be called by the contract owner.

Inputs

  • depositContract

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Address of the deposit contract.

  • depositToken

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Address of the deposit token.

  • fee

    • Control: Arbitrary.

    • Constraints: Value between zero and 10,000.

    • Impact: Fee in basis points.

  • enabled

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Boolean value to determine if the fee configuration is enabled.

  • feeRecipient

    • Control: Arbitrary.

    • Constraints: Nonzero.

    • Impact: Address of the fee recipient.

  • providerFee

    • Control: Arbitrary.

    • Constraints: Value between zero and 10,000.

    • Impact: Provider's share of the fee in basis points.

Branches and code coverage

Intended branches

  • Update the fee configuration.

Negative behavior

  • Revert if the caller is not the contract owner.

  • Revert if the fee is greater than 10,000.

  • Revert if the provider fee is greater than 10,000.

  • Revert if the fee-recipient address is invalid.

Zellic © 2024Back to top ↑