Skip to content

Commit

Permalink
Fix flashloan logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
LybraFinance committed Aug 12, 2023
1 parent bbcf186 commit f6c3afb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contracts/lybra/token/PeUSDMainnet.sol
Expand Up @@ -131,6 +131,7 @@ contract PeUSDMainnet is OFTV2 {
receiver.onFlashLoan(shareAmount, data);
bool success = EUSD.transferFrom(address(receiver), address(this), EUSD.getMintedEUSDByShares(shareAmount));
require(success, "TF");
require(EUSD.balanceOf(address(this)) <= configurator.getEUSDMaxLocked(),"ESL");

uint256 burnShare = getFee(shareAmount);
EUSD.burnShares(msg.sender, burnShare);
Expand Down

0 comments on commit f6c3afb

Please sign in to comment.