0xNazgul / Hats-Game-2-Solution

Find the game repo here: https://github.com/hats-finance/vault-game

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hats Challenge #2

Challenge Solution (Spoilers)

If you get stuck, I would look at this list first before spoiling it completely for yourself

I like to throw it in Remix to play around with it. Hope this helps and have fun with it!

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

About

Find the game repo here: https://github.com/hats-finance/vault-game


Languages

Language:Solidity 70.1%Language:JavaScript 29.9%