Users Can Contribute To An Auction Without Directly Committing Collateral Tokens #188
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Handle
leastwood
Vulnerability details
Impact
purchaseArbitrageTokens
enables users to commit collateral tokens and in return receive arbitrage tokens which are redeemable in the future for Malt tokens. Each auction specifies a commitment cap which when reached, prevents users from participating in the auction. However,realCommitment
can be ignored by directly sending theLiquidityExtension
contract collateral tokens and subsequently callingpurchaseArbitrageTokens
.Proof of Concept
Consider the following scenario:
LiquidityExtension
contract.purchaseArbitrageTokens
with amount0
.purchaseAndBurn
call returns a positivepurchased
amount which is subsequently used in auction calculations.As a result, a user could effectively influence the average malt price used throughout the
Auction
contract.https://github.com/code-423n4/2021-11-malt/blob/main/src/contracts/Auction.sol#L177-L214
https://github.com/code-423n4/2021-11-malt/blob/main/src/contracts/LiquidityExtension.sol#L117-L128
Tools Used
Manual code review.
Recommended Mitigation Steps
Consider adding a check to ensure that
realCommitment != 0
inpurchaseArbitrageTokens
.The text was updated successfully, but these errors were encountered: