Skip to content

nicobevilacqua/hctf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hats Challenge #2

Capture the Flag

The contract Vault.sol is an ERC4626-like vault customized to be used with ETH. It allows anyone to deposit ETH in the vault and get shares corresponding to the amount deposited. The shares are an ERC20 which can be freely used by users, functioning effectively just like Wrapped ETH. The shares can also be redeemed at any time for the corresponding underlying amount of ETH.

The Hats Challenge

The Vault.sol is deployed with the contract owning 1 ETH of the shares.

Your mission is to capture the flag by emptying the vault, then calling captureTheFlag with an address you control to prove that you have succeeded in completing the challenge, so that vault.flagHolder returns your address.

How to submit

Run Hack Proof of Concept

  $ npx hardhat test ./test/Hack.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published