Assessment reports>Lido Fixed Income>Threat Model>initialize

Function: initialize(InitializationParams params)

This function is to initialize new LidoVault.

Inputs

  • params

    • Control: Arbitrary.

    • Constraints: The values in params is not zero.

    • Impact: The values required to initialize.

Branches and code coverage

Intended branches

  • Initialize if the params are not zero.

Negative behavior

  • Reverts if the params.protocolFeeReceiver address is zero.

  • Reverts if the params.earlyExitFeeBps is zero.

  • Reverts if the params.vaultId is zero.

  • Reverts if the params.duration is zero.

  • Reverts if the params.fixedSideCapacity is zero.

  • Reverts if the params.variableSideCapacity is zero.

  • Reverts if the fixedSideCapacity.mulDiv(minimumFixedDepositBps, 10_000) is smaller than minimumDepositAmount.

  • Reverts if the fixedSideCapacity is not zero.

Function call analysis

  • Math.mulDiv(params.fixedSideCapacity, this.minimumFixedDepositBps, 10000)

    • What is controllable? fixedSideCapacity.

    • If the return value is controllable, how is it used and how can it go wrong? None.

    • What happens if it reverts, reenters or does other unusual control flow? N/A.

Zellic © 2024Back to top ↑