Function: borrow(address account, uint256 amount, uint256 fee)
This borrows onlyDebt.
Inputs
accountControl: Full.
Constraints: None.
Impact: The account.
amountControl: Full.
Constraints: None.
Impact: The amount to borrow.
feeControl: Full.
Constraints: None.
Impact: The fee.
Branches and code coverage (including function calls)
Intended branches
Limits are respected.
Sends the user the borrowed assets.
Negative behavior
Slippage enforced.
Function call analysis
borrow(...) -> assetsPerShare()What is controllable? Everything.
If return value controllable, how is it used and how can it go wrong? Assets per share.
What happens if it reverts, reenters, or does other unusual control flow? N/A.
borrow(...) -> market.debt().mintDebt(account, amount + fee)What is controllable? Full.
If return value controllable, how is it used and how can it go wrong? Discarded.
What happens if it reverts, reenters, or does other unusual control flow? N/A.
borrow(...) -> asset.safeTransfer(account, amount)What is controllable? Full.
If return value controllable, how is it used and how can it go wrong? Discarded.
What happens if it reverts, reenters, or does other unusual control flow? N/A.
borrow(...) -> _mint(market, (fee * _base_unit) / assets_per_share)What is controllable? Full.
If return value controllable, how is it used and how can it go wrong? Discarded.
What happens if it reverts, reenters, or does other unusual control flow? N/A.