Submitted by TomFrenchBlockchain, also found by cmichel
Total loss of funds which have been approved on VaderPoolV2
VaderPoolV2 allows minting of fungible LP tokens with the mintFungible function
https://github.com/code-423n4/2021-11-vader/blob/607d2b9e253d59c782e921bfc2951184d3f65825/contracts/dex-v2/pool/VaderPoolV2.sol#L284-L290
Crucially this function allows a user supplied value for from which specifies where the nativeAsset and foreignAsset should be pulled from. An attacker can then provide any address which has a token approval onto VaderPoolV2 and mint themselves LP tokens - stealing the underlying tokens.
Remove from argument and use msg.sender instead.
SamSteinGG (Vader) disputed):
alcueca (judge) commented:
SamSteinGG (Vader) confirmed:
