We tested AuditAgents against a simplified DeFi lending contract that relies on a single manipulable price oracle to calculate borrowing power.
Oracle manipulation is a well-documented attack class in DeFi. When a protocol uses a single external price feed without validation or circuit breakers, an attacker can use flash loans to temporarily move the price reported by the oracle, borrow far more than the collateral actually supports, and walk away with excess funds before the price reverts.
For this benchmark, we created a simplified lending contract with a single oracle dependency and submitted it to AuditAgents without any vulnerability hints or annotations.
The following contract uses a single unvalidated oracle price to calculate borrowing capacity:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IOracle {
function getPrice() external view returns (uint256);
}
contract LendingPool {
IOracle public oracle;
mapping(address => uint256) public collateral;
mapping(address => uint256) public borrowed;
constructor(address _oracle) { oracle = IOracle(_oracle); }
function deposit() external payable {
collateral[msg.sender] += msg.value;
}
// ⚠ Borrow limit calculated from a single manipulable price source
function borrow(uint256 amount) external {
uint256 price = oracle.getPrice();
uint256 maxBorrow = (collateral[msg.sender] * price) / 1e18;
require(borrowed[msg.sender] + amount <= maxBorrow, "over limit");
borrowed[msg.sender] += amount;
payable(msg.sender).transfer(amount);
}
}
borrow() to claim far more than their collateral supports, then repays the flash loan — keeping the excess.
AuditAgents identified the core oracle manipulation risk along with several secondary issues:
| Expected Detection | AuditAgents Result |
|---|---|
| Oracle Manipulation Risk | ✓ PASS |
| Single Oracle Dependency | ✓ PASS |
| Over-Borrowing Scenario | ✓ PASS |
| Economic Attack Path | ✓ PASS |
| Severity Prioritization | ⚠ PARTIAL |
AuditAgents successfully identified the core oracle-manipulation vulnerability, including the over-borrowing attack path and dependence on a single external price source.
However, the report devoted significant attention to protocol completeness concerns — missing withdrawal, repayment, and liquidation mechanisms — which were outside the primary benchmark objective and inflated the finding count without contributing to the core security assessment.
See Benchmark Methodology for how PARTIAL is defined.