Description:
Delve into the digital abyss, reclaiming lost ether like a thrilling lottery of untapped riches
How to Submit a Solution:
Use the below submission form to submit the solution: https://quillaudits.typeform.com/QuillCTF
Objective of CTF
There are 200 ethers lying on an unclaimed address waiting to be retrieved using the Factory contract.
You are given 11 ether use them to retrieve it
Note: You can create POCs using Foundry/Hardhat. Without proper POC, your submissions will not be accepted.
Georli Link:
Contract Code:
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
import {Test} from "forge-std/Test.sol";
import "forge-std/console.sol";
contract Factory {
function dep(bytes memory _code) public payable returns (address x) {
require(msg.value >= 10 ether);
assembly {
x := create(0, add(0x20, _code), mload(_code))
}
if (x == address(0)) payable(msg.sender).transfer(msg.value);
}
}
contract Lottery is Test {
Factory private factory;
address attacker;
function setUp() public {
factory = new Factory();
attacker = makeAddr("attacker");
}
function testLottery() public {
vm.deal(attacker, 11 ether);
vm.deal(0x0A1EB1b2d96a175608edEF666c171d351109d8AA, 200 ether);
vm.startPrank(attacker);
//Solution
vm.stopPrank();
assertGt(attacker.balance, 200 ether);
}
}
Solutions:
Coming Soon…..