This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: GPL-3.0-or-later | |
pragma solidity 0.8.3; | |
import {INFT} from "./INFT.sol"; | |
import {IDInterest} from "./IDInterest.sol"; | |
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | |
import { | |
SafeERC20 | |
} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: GPL-3.0-or-later | |
pragma solidity 0.8.3; | |
contract DummyMPHMinter { | |
address private constant govTreasury = | |
0x56f34826Cc63151f74FA8f701E4f73C5EAae52AD; | |
address private whitehat; | |
function setWhitehat(address newWhitehat) external { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.6.0; | |
pragma experimental ABIEncoderV2; | |
import "./IERC20.sol"; | |
import "./IWETH.sol"; | |
import "./IUniswapV2Pair.sol"; | |
import "./IUniswapV2Router02.sol"; | |
import "./IUpdateableOracle.sol"; | |
import "./IAaveLendingPool.sol"; | |
import "./IFlashLoanReceiver.sol"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.6.0; | |
import "../bondingcurve/IBondingCurve.sol"; | |
contract Allocator { | |
constructor(IBondingCurve bondingCurve) public { | |
// We run this call from a constructor | |
// to bypass the non-contract check of `allocate()` | |
bondingCurve.allocate(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script calculates the optimal values for the exploit to achieve maximum profit. | |
# It uses GEKKO, a nonlinear (NLP) solver, to maximize the objective function while adhering to constraints. | |
from gekko import GEKKO | |
def main(): | |
# The GEKKO model | |
m = GEKKO() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.6.0; | |
pragma experimental ABIEncoderV2; | |
import "./refs/UniRef.sol"; | |
import "./external/UniswapV2Library.sol"; | |
import "@uniswap/v2-periphery/contracts/interfaces/IWETH.sol"; | |
contract Exploit { | |
using SafeMathCopy for uint256; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.6.0; | |
pragma experimental ABIEncoderV2; | |
import "./refs/UniRef.sol"; | |
import "./pcv/IUniswapPCVController.sol"; | |
import "./external/UniswapV2Library.sol"; | |
import "@uniswap/v2-periphery/contracts/interfaces/IWETH.sol"; | |
contract ReweightFrontrun { |