Skip to content

Commit

Permalink
fix: Add comment to elaborate on unusual flow in flashloan simple
Browse files Browse the repository at this point in the history
  • Loading branch information
LHerskind committed Nov 11, 2021
1 parent e5b9c2a commit 5f41c07
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contracts/protocol/libraries/logic/FlashLoanLogic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ library FlashLoanLogic {
DataTypes.ReserveData storage reserve,
DataTypes.FlashloanSimpleParams memory params
) external {
// The usual action flow (cache -> updateState -> validation -> changeState -> updateRates)
// is altered to (validation -> user payload -> cache -> updateState -> changeState -> updateRates) for flashloans.
// This is done to protect against reentrance and rate manipulation within the user specified payload.

ValidationLogic.validateFlashloanSimple(reserve);
FlashLoanSimpleLocalVars memory vars;

Expand Down

0 comments on commit 5f41c07

Please sign in to comment.