We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

nepek62537 • 3 years ago

Hey Markus, in the flashLoan function, do you know why is the allowance and approve included?

Couldn't just work with: _burn(address(receiver), amount + fee); ?

I am referring to these lines below:

uint256 _allowance = allowance(address(receiver), address(this));
require(_allowance >= (amount + fee), "FlashMinter: Repay not approved");

_approve(address(receiver), address(this), _allowance - (amount + fee));