VaderPoolV2 minting synths & fungibles can be frontrun
Submitted by cmichel, also found by cccz, Critical, danb, leastwood, and TomFrenchBlockchain
The VaderPoolV2 mintFungible and mintSynth functions perform an unsafe nativeAsset.safeTransferFrom(from, address(this), nativeDeposit) with a parameter-specified from address.
Note that these functions are not called by the Router, they are directly called on the pool. Therefore, users will usually be required to send two transactions, a first one approving the pool, and then a second one for the actual mintSynth.
An attacker can frontrun the mintSynth(IERC20 foreignAsset, uint256 nativeDeposit, address from, address to) function, use the same from=victim parameter but change the to parameter to the attacker.
Impact
It’s possible to frontrun victims stealing their native token deposits and receiving synths / fungible tokens.
Recommended Mitigation Steps
Remove the from parameter and always perform the safeTransferFrom call with from=msg.sender.
SamSteinGG (Vader) acknowledged
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A high-severity business logic bug in Vader Protocol contest. Code4rena made it public on 3 May 2022. Found in the 2021-12-vader audit contest (finding H-01).
About Business logic
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.