theCyber — The new GateKeeperTwo
Shortly after the information being published, a flaw in theCyberGateKeeper has been raised on reddit, window=_blank. As a result, a new version of the GateKeeper smart contract has been written and deployed by 0age.
In this article, we take a look at the new smart contract: GateKeeperTwo.
|NON SPOILER ALERT: If you read the previous articles, you know that I don’t intend (at least yet) to spoil the fun of entering the theCyber by yourself. This is why no information will be published that is not public yet. This article is not intended to provide any sort of solution.|
Blockchain and Smart Contracts do not work as software development as you know it. When you find a bug in a Smart Contract, you cannot simply update this Smart Contract with a new version. The data stored on a Blockchain is immutable.
After the bug was discover (and discussed on reddit), a new version of the GateKeeper has been deployed at a new address.
The new contract can be found at gatekeepertwo.thecyber.eth, window=_blank.
Beside fixing the issue of the first GateKeeper contract, the new version brings a couple of changes:
There can only be now a maximum of 128 entrant submissions (250 previously)
A few more data and helpers are exposed, you can see them here, window=_blank
Some of the Gates have been changed
All the entrants that managed to enter the original GateKeeper before block #5375177, window=_blank have been added to the new GateKeeperTwo contract
While the GateOne did not change, GateTwo and GateThree are totally new beasts.
The first gate is an old friend if you analysed the first GateKeeper.
If you have a little experience with Solidity or take the time to read the solidity documentation around this chapter, window=_blank, you should be able to pass this gate without much troubles.
0age offers us here a nice challenge. Your eyebrows will likely raise once you pass GateOne and read the requirements of the following modifier.
Solidity is a high level language to write smart contracts but also allows using assembler instructions. Although an educated guess may do, you are probably eager to know what extcodesize() exactly does and what Caller is. You will find some more information in the solidity documentation again, right there, window=_blank.
Another new challenge here. GateThree uses again the notion of GateKey that we saw in the first GateKeeper. So it seems that we need again to provide a valid passphrase as well as a _gatekey that will satisfy the condition below:
The new contract comes with a few goodies. Assuming you got a passphrase somewhere, the new contract allows you to check whether this pass phrase has been already used or not.
We can see for instance that correct horse battery staple has never been used. Let me save you some unsuccessful attempts, this pass phrase is NOT part of the valid ones. No need to check it!
On the other hand, we can see that the correct pass phrase prejudice salmon mislead collect has been used already, so no need to try this one either:
Current number of entrants
At the time of writing, the number of account that made it into the GateKeeperTwo is 51/128.
Once again, 0age offers us here an exciting challenge and a great opportunity to learn about solidity, Ethereum and Smart Contracts.
As with many puzzles, the solution seems to be impossible until you find it and realise that it was not that hard after all.
Good luck and see you in theCyber.