├── .gitignore ├── README.md ├── contracts ├── Attacker.sol ├── SimpleAMM.sol ├── SimpleLender.sol ├── TestUSDC.sol └── interfaces │ ├── IERC20.sol │ ├── ISimpleAMM.sol │ └── ISimpleLender.sol ├── hardhat.config.js ├── package.json ├── scripts └── sample-script.js └── test ├── OracleAttack.test.js └── utils.js /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvwang9/oracle-manipulation/HEAD/.gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvwang9/oracle-manipulation/HEAD/README.md -------------------------------------------------------------------------------- /contracts/Attacker.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvwang9/oracle-manipulation/HEAD/contracts/Attacker.sol -------------------------------------------------------------------------------- /contracts/SimpleAMM.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvwang9/oracle-manipulation/HEAD/contracts/SimpleAMM.sol -------------------------------------------------------------------------------- /contracts/SimpleLender.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvwang9/oracle-manipulation/HEAD/contracts/SimpleLender.sol -------------------------------------------------------------------------------- /contracts/TestUSDC.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvwang9/oracle-manipulation/HEAD/contracts/TestUSDC.sol -------------------------------------------------------------------------------- /contracts/interfaces/IERC20.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvwang9/oracle-manipulation/HEAD/contracts/interfaces/IERC20.sol -------------------------------------------------------------------------------- /contracts/interfaces/ISimpleAMM.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvwang9/oracle-manipulation/HEAD/contracts/interfaces/ISimpleAMM.sol -------------------------------------------------------------------------------- /contracts/interfaces/ISimpleLender.sol: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvwang9/oracle-manipulation/HEAD/contracts/interfaces/ISimpleLender.sol -------------------------------------------------------------------------------- /hardhat.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvwang9/oracle-manipulation/HEAD/hardhat.config.js -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvwang9/oracle-manipulation/HEAD/package.json -------------------------------------------------------------------------------- /scripts/sample-script.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvwang9/oracle-manipulation/HEAD/scripts/sample-script.js -------------------------------------------------------------------------------- /test/OracleAttack.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvwang9/oracle-manipulation/HEAD/test/OracleAttack.test.js -------------------------------------------------------------------------------- /test/utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/calvwang9/oracle-manipulation/HEAD/test/utils.js --------------------------------------------------------------------------------