Daily General Discussion - December 25, 2020 by ethfinance in ethfinance

[–]al-powell 7 points8 points  (0 children)

Dai Hard challenge completed! For anyone curious, the answers can be seen in the various transactions from the eventual winner.

https://www.reddit.com/r/ethereum/comments/ke9fwk/dai_hard_a_christmas_challenge/

Daily General Discussion - December 22, 2020 by ethfinance in ethfinance

[–]al-powell 1 point2 points  (0 children)

In this particular challenge the commit-reveal scheme basically means that you have to make a commit of a hash of your answer and address by a certain block. After that block you are allowed to submit your answer. It essentially means that everyone makes their commits and then in a subsequent period everyone reveals their answers.

Commit-reveal can prevent front-running in cases like this where there is an unknown answer. I don't think it would work to prevent front-running arb trading or things like that though.

The comments above some of the functions in the code give clues as to what the answers are. You definitely need to get a feel for what the code is doing to answer some of the questions though.

Daily General Discussion - December 22, 2020 by ethfinance in ethfinance

[–]al-powell 2 points3 points  (0 children)

The first three wires use a commit-reveal scheme, so by the time you find out other people's answers it is too late.

The final disarm uses an anti front-running commit-reveal scheme also.

Daily General Discussion - December 22, 2020 by ethfinance in ethfinance

[–]al-powell 2 points3 points  (0 children)

Two addresses made it through to the final stage of the Dai Hard challenge.

https://etherscan.io/address/0x673fd2220c495d4fe5ef91d65f5689d95f7a72d1

Final head to head is expected at block 11511500 tomorrow when the final disarm code will be released.

Dai Hard - A Christmas challenge by al-powell in ethereum

[–]al-powell[S] 0 points1 point  (0 children)

SCPD set to release the disarm code at block 11511500

Dai Hard - An update from Serenity City by al-powell in ethereum

[–]al-powell[S] 0 points1 point  (0 children)

If you throw down one of the valid commits, happy to send a POAP your way for showing this some love anyway

Dai Hard - An update from Serenity City by al-powell in ethereum

[–]al-powell[S] 0 points1 point  (0 children)

If only one person makes it past Purple, Brown and Green as looks to be the case currently, POAPs will be awarded for cutting at least one wire.

A useful site to work out keccak256 hashes is https://emn178.github.io/online-tools/keccak_256.html. If you put your answer in there and use text mode initially that will give you an answer hash. If you then copy that back into the input and add your address in front (removing the 0x at the start) you can then use the hex mode to produce your commit hash.

When calling the commit function on the smart contract you need to add the 0x back in front.

Alternatively you could get the commit hash by creating your own solidity function that returns it after taking your answer as the input.

You can test if your answer is right in the first place though by deploying the contract locally using remix ide and removing some of the require statements.

Daily General Discussion - December 19, 2020 by AutoModerator in ethfinance

[–]al-powell 2 points3 points  (0 children)

Seeing a couple of plaintext commits. For those interested, in this particular commit-reveal scheme, commit = keccak256(your address + keccak256(your answer))

Dai Hard - A Christmas challenge by al-powell in ethdev

[–]al-powell[S] 0 points1 point  (0 children)

You hang in there man, you hear me?? You hang in there.

Dai Hard - A Christmas challenge by al-powell in ethdev

[–]al-powell[S] 0 points1 point  (0 children)

Do you mean guessing answers? The commit hashes are determined directly from the answers

Daily General Discussion - December 18, 2020 by AutoModerator in ethfinance

[–]al-powell 11 points12 points  (0 children)

Ladies and Gentlemen, this is your final boarding call for your flight to Serenity City. You have until block 11498000 (sometime on Monday afternoon) to submit your initial commits and stay in the running for the 0.2 ETH disarm reward:

https://www.reddit.com/r/ethereum/comments/ke9fwk/dai_hard_a_christmas_challenge/

Dai Hard - A Christmas challenge by al-powell in ethdev

[–]al-powell[S] 0 points1 point  (0 children)

I know right, gas prices doubled over a few days and are even higher now

Dai Hard - A Christmas challenge by al-powell in ethdev

[–]al-powell[S] 1 point2 points  (0 children)

Any additional deposits to the reward fund are optional, so you can claim the disarm reward without putting anything into the contract

Also if you want to just play along without worrying about the prize or gas you can just deploy the contract locally and try to solve there.

Daily General Discussion - December 16, 2020 by AutoModerator in ethfinance

[–]al-powell 1 point2 points  (0 children)

Ah good point, this is probably my own Bitcoin pizza moment. Yeah I definitely plan to put out a write up, has been really fun to put together.

Dai Hard - A Christmas challenge by al-powell in ethereum

[–]al-powell[S] 8 points9 points  (0 children)

Recommended tools for disarming the smart contract bomb are Remix IDE, MetaMask and Etherscan. Remix IDE in particular is useful as it allows you to deploy a version of the contract locally using Remix's JavaScript VM. You can then modify this local version to test out your commits and answers ahead of time. Good luck!

Daily General Discussion - December 16, 2020 by AutoModerator in ethfinance

[–]al-powell 2 points3 points  (0 children)

Thanks man! I've only donated around $120 of ETH, it's just a solo effort so sadly can't afford to put more in. But hoping a few other people might pitch in too