Function: stakeToFalconPosition(uint256 amount, uint256 duration, address recipient)
This function stakes existing USDf directly to the FalconPosition contract.
Inputs
amount
Control: Fully controlled by the caller.
Constraints: N/A.
Impact: Amount of USDf to stake.
duration
Control: Fully controlled by the caller.
Constraints: N/A.
Impact: Duration of staking for the FalconPosition contract.
recipient
Control: Fully controlled by the caller.
Constraints: N/A.
Impact: Address for receiving staking position NFT.
Branches and code coverage
Intended branches
Check if the amount is not zero.
Check if the recipient is not the zero address.
Transfer USDf from the caller.
Stake USDf and receive sUSDf.
Call FalconPosition's mint function to mint position NFT.
Transfer position NFT to the recipient.
Negative behavior
If the amount is zero, the transaction will be reverted.
If the recipient is the zero address, the transaction will be reverted.