Assessment reports>Alkimiya>Threat Model>_collateralizedMint

Function: _collateralizedMint(PoolParams poolParams, uint256 shares, address payer, address longRecipient, address shortRecipient)

This function is used to mint long and short tokens for a pool.

Inputs

  • poolParams

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Pool parameters.

  • shares

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Amount of shares.

  • payer

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Address of the payer of collateral.

  • longRecipient

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Address of the recipient of long tokens.

  • shortRecipient

    • Control: Arbitrary.

    • Constraints: None.

    • Impact: Address of the recipient of short tokens.

Branches and code coverage

Intended branches

  • Calculates the collateral amount using the pool parameters.

  • Transfers the collateral from the payer to the contract.

  • Mints shares long and short tokens to the respective recipients.

Negative behavior

  • Reverts if the pool has already ended.

Zellic © 2024Back to top ↑