DittoETH

Ditto
DeFiFoundryOracle
55,000 USDC
View results
Submission Details
Severity: medium
Invalid

Base Fee can be manipulated by Validators

Summary

Liquidators are currently compensated for gas fees by multiplying the block base fee with the gas used. When the base fee is zero, we do not compensate for gas used.

Vulnerability Details

In the future the baseFee could be become zero and an unreliable metric for cost paid by liquidators.

gasFee = basefee * gasUsed

In Proof of Stake the Validators have an interest in lowering the baseFee since that part of the fee is burned.
There are some strategies (1, 2) that validator can adopt to lower the baseFee to zero.

Impact

If the base fee is zero, liquidators only receive a percentage of the ethFilled as callerFee, making small position liquidations unprofitable.
callerFee = m.ethFilled.mulU88(m.callerFeePct);
This could increase bad debt in the protocol.

Tools Used

Manual Review.

Recommendations

Though the likelihood of this issue is uncertain, it's essential to prepare for all market conditions. One solution is refactoring the code to use an external Oracle like Chainlink for gas prices if the base fee is zero.

function getGasPrice() external view returns(uint256){
if (useBaseFee) {
return tx.baseFee
} else {
return chainlinkGasPrice();
}
Updates

Lead Judging Commences

0xnevi Lead Judge
almost 2 years ago
0xnevi Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.