code-423n4 / 2022-03-lifinance-findings

6 stars 4 forks source link

dangerous payable function #185

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Lines of code

https://github.com/code-423n4/2022-03-Li.finance/blob/main/src/Facets/NXTPFacet.sol#L46

Vulnerability details

A user might accidently send ether if sendingAssetId is not ether.

Recommendation

add in line 54:

require(msg.value == 0);
H3xept commented 2 years ago

Duplicate of https://github.com/code-423n4/2022-03-lifinance-findings/issues/53