Function: create(TokenType tokenType, uint256 depositAmount, uint256 minAmount)
This function is used to create bond or leverage tokens by depositing reserve tokens. The function calculates the amount of new tokens to create based on the current pool state and oracle price.
Inputs
tokenTypeControl: Arbitrary.
Constraints: Bond or leverage token.
Impact: Type of token to create.
depositAmountControl: Arbitrary.
Constraints: None.
Impact: The amount of reserve tokens to deposit.
minAmountControl: Arbitrary.
Constraints: None.
Impact: The minimum amount of output tokens to receive.
Branches and code coverage
Intended branches
Invoke the
_createfunction.
Negative behavior
Revert if the contract is paused.
Revert if the function is reentrant.