File size: 1,007 Bytes
be76e11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | // Testing oracle lag on Morpho Blue.
// If the fixed rate doesn't update, we can just arb it.
// Need to check why this vault doesn't handle the tick spread correctly.
// Testing directly against storage slots
contract Exploit {
address constant MORPHO = 0xBBBBBbbBBb9cC5e90e7b3Af60BDf0224d08b3400;
// Use a simple run function for forge script, not a full unit test suite
function run() external {
// Assume the fork is already set up via forge script env
// console.log("Starting exploit...");
// Target: Oracle manipulation / fee leakage
// abi.encodeWithSignature is much cleaner than dragging in huge interfaces
(bool success, bytes memory data) = MORPHO.call(
abi.encodeWithSignature("supply(bytes32,uint256,uint256,address,bytes)",
0x0, 0, 0, address(this), "")
);
require(success, "Exploit failed at supply");
// log the result raw
// console.logBytes(data);
}
}
|