Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vault's flash loan not implemented according to EIP-3156 #54

Open
code423n4 opened this issue May 11, 2021 · 1 comment
Open

Vault's flash loan not implemented according to EIP-3156 #54

code423n4 opened this issue May 11, 2021 · 1 comment
Labels
1 (Low Risk) bug Something isn't working Confirmed

Comments

@code423n4
Copy link
Contributor

Handle

@cmichelio

Vulnerability details

Vulnerability Details

The NFTXVaultUpgradeable.flashLoan is not correctly implemented according to EIP-3156 (but it tries to implement it as it inherits from IERC3156FlashLenderUpgradeable).

"If successful, flashLoan MUST return true." - https://eips.ethereum.org/EIPS/eip-3156

It misses the return and currently always returns false.

Impact

Always returning false indicates that the flash loan was unsuccessful when in reality it could have been successful.
This breaks any contract trying to integrate with it.

Recommended Mitigation Steps

Add the return statement: return super.flashLoan(...)

@code423n4 code423n4 added 3 (High Risk) bug Something isn't working labels May 11, 2021
code423n4 added a commit that referenced this issue May 11, 2021
@0xKiwi 0xKiwi closed this as completed May 21, 2021
@cemozerr
Copy link
Collaborator

Keeping this as low-risk as flash loan returning the project does not pose a security threat for the NFTX project itself

@cemozerr cemozerr reopened this May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 (Low Risk) bug Something isn't working Confirmed
Projects
None yet
Development

No branches or pull requests

3 participants