Function: createPool()

This function is used to create a new pool using the accumulated deposits after the deposit period ends.

Branches and code coverage

Intended branches

  • Approve the factory contract to spend the reserve token.

  • Call the createPool function of the factory contract with the required parameters.

  • Update the poolCreated flag to true.

Negative behavior

  • Revert if the deposit period has not ended.

  • Revert if the reserve amount is zero.

  • Revert if the bond or leverage amount is zero.

  • Revert if the pool has already been created.

  • Revert if the contract is paused.

  • Revert if this function is called in a reentrant manner.

Zellic © 2025Back to top ↑