Liquidation accepts a stale oracle price
- Severity
- High
- Evidence
- Proven
- Affected contract
- LendingPool.sol · Base
liquidate() reads the oracle without checking when the price was last updated, so a position can be liquidated at a price the market has moved away from.
// fork of Base at the audited block
function test_liquidateAtStalePrice() public {
vm.createSelectFork("base", FORK_BLOCK);
vm.warp(block.timestamp + 3 hours);
vm.prank(liquidator);
pool.liquidate(borrower, USDC, debt);
assertGt(usdc.balanceOf(liquidator), debt);
}
[PASS] test_liquidateAtStalePrice()