Assessment reports>Alkimiya>Threat Model>_collateralRefund

Function: _collateralRefund(PoolParams poolParams, uint256 shares)

This function is used to refund the collateral to the user.

Inputs

  • poolParams

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Pool parameters.

  • shares

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Amount of shares.

Branches and code coverage

Intended branches

  • Calculates the refund amount using the pool parameters.

  • Burns the caller's long and short shares.

  • Transfers the refund amount to the caller.

Zellic © 2024Back to top ↑