ethereum / ERCs

The Ethereum Request for Comment repository
Creative Commons Zero v1.0 Universal
299 stars 399 forks source link

clarifications on ERC-3156 flash loan implementation #518

Open BigGod12 opened 1 month ago

BigGod12 commented 1 month ago

Hi while reading through https://github.com/ethereum/ercs/blob/master/ERCS/erc-3156.md is it advisable to use reentrance guard for the flash loan function within the contract implementing the "flash lender" interface?? even if the "receiver" contract call back within the onFlashloan to take more loan.. though the transaction should revert if the "REENTER" amount was not repaid but the first initial loan was repaid. since there is two race window "flash loan" that must be repaid. this blog https://www.rareskills.io/post/erc-3156 suggest using "nonReentrant" for security purposes. but i see no reason for that.

poojaranjan commented 1 month ago

Please add your question at FEM Discussion to get the author's attention or response from an EIP implementer/expert.

BigGod12 commented 1 month ago

Please add your question at FEM Discussion to get the author's attention or response from an EIP implementer/expert.

oh. thank you for the information