Lines of code
<https://github.com/code-423n4/2022-08-mimo/blob/main/contracts/actions/MIMOEmptyVault.sol#L14>
Both MIMOEmptyVault and MIMOLeverage contracts share same signature/definition, an attacker can gain control of EmptyVault contract, issue a flash loan, and empty the vaults.
See the test below. In below test, EmptyVault contract is deployed and the referece is stored in Leverage contract variable.
> await deploy(“MIMOEmptyVault”, {
from: owner.address,
args: [addressProvider.address, dexAddressProvider.address, lendingPool.address, mimoProxyRegistry.address],
});
const leverage: MIMOLeverage = await ethers.getContract(“MIMOEmptyVault”);
Now I have gained access to EmptyVault and I can execute operations.
yarn test
The text was updated successfully, but these errors were encountered:
All reactions