World’s largest Ethereum Hackathon — ETH San Francisco
The Learnings, The Project, and The Trend
ETHSanFrancisco was held on October 5 with 1000 hackers selected worldwide for a non-stop 36 hours of developing innovative solutions with the Ethereum blockchain. In addition, San Francisco Blockchain Week (SFBW), a week of numerous tech talks and workshops on blockchain, and the Bitcoin Cash hackathon were also held right after this. Blockchain enthusiasts such as myself thus see this as a must-go event that worths traveling all the way from Taiwan for.
Overview & Incentive
I’d like to share what I’ve learned from this special experience, especially the workshops during the hackathon, the Cross Chain Atomic Swap project our team built(which luckily won the ConsenSys sponsored prize!), and the trend I observed from other winning teams. Hope you like it:)
The Learnings — Talks & Workshops during the hack
There were around 35 condensed talks and workshops(each 20 minutes), with topic including off-chain scalability, data privacy, smart contract security, upgradable smart contracts, and decentralized payment applications(list of slides). Here are a few highlights:
- Off-chain scalability: Both Counterfactual and Liquidity talked about scaling with state channels, where a fixed group of people can interact efficiently through exchanging data within themselves (off-chain), and only broadcast the final result as a single transaction to the blockchain.
- Data privacy: NuCypher introduces a new encryption design for distributed systems called Proxy re-encryption, where it tries to solve the problem of sharing data privately between multiple parties.
- Smart contract security: Zeppelin went through the classic hacks from 2016(In specific, Rubixi, BeautyChain, Parity Wallet, the DAO), and the tools/libraries they developed to prevent these mistakes from happening.
- Upgradable smart contracts: TrustToken, the creator of TrueUSD, explained why they found the need in upgrading smart contracts and which design they chose to implement. They used the Separate Storage pattern, which separates a smart contract into a logic contract and a storage contract, so that when performing updates, only the logic contract has to be modified. An intro of existing design patterns can be found here.
- Decentralized payment applications: Wyre held a workshop on their API for making crypto-fiat currency exchange easier. Connext demonstrated their state channel implementation as an NPM module for peer to peer payment.
Hope these can give you an overview on the current hot topics in Ethereum;)
The Project — BTC-ETH Cross Chain Atomic Swap
In laymen’s term, the project is about swapping Bitcoin(BTC) and Ether(ETH) in a way that the swapping operation has only two outcomes: be reverted or completed successfully. There is no chance that the swap is interrupted in the middle, which may result in one person loses the two coins while the other gains them all. This is where the name Atomic comes from.
The term Cross Chain implies that the swapping of the two different coins requires interaction between two blockchains, Bitcoin and Ethereum. To achieve this in the hackathon, we used a simple multi-blockchain friendly interface called Chain Abstraction Layer developed by the Liquality team under ConsenSys. In specific, it is an npm module which you can access different blockchains using the same code! :D
But what if someone malicious refuses to send the coin to the other as promised? Here is the solution from the Bitcoin wiki:
Suppose Alice wants to swap her Bitcoin with Bob’s Ether.
- First, Alice will lock her Bitcoin and pick a secret key. Bob can unlock and spend the Bitcoin if he knows the secret key, but the lock will be invalid after 48 hours and refund Alice her Bitcoin. The hash of the secret will also be send to Bob. The hash can only validate the correctness of the secret if Bob eventually gets that secret, but cannot help Bob figure out the secret himself.
- Second, Alice tells Bob that he also has to lock his Ether in order for her to reveal the secret key. Bob then locks his coin and set the unlock key as Alice’s secret, which he can use the hash of the secret he just got from Alice to validate the key. The lock will also be invalid and refund to him after 24 hours. (the difference in expiration time will be explained below)
- Third, Alice can unlock Bob’s Ether with her secret key within 24 hours. Bob’s Ether will be unlocked if the hash of the secret key is correct. Obviously, Bob can finally know what the secret key is after this stage.
- Fourth, Bob will have the incentive to use the key he just got to unlock Alice’s Bitcoin. If Alice unlock at the last moment(exactly 24 hours after Bob locked the coin), Bob will now have 48 – 24= 24 hours to unlock before it becomes invalid. In this example, you can see why the expiration time of Alice’s lock(48 hours) must be longer than Bob’s(24 hours).
Here is the video we made in the hackathon demonstrating this concept, and here is the project submission page with the code base. Special thanks to Matthew Black for providing timely and helpful guidance along our hacking journey!
The Trend — Observations from the winning teams
Top 10 finalist in alphabetic order from the ETHSanFrancisco Twitter:
- Atomic XShard Transactions with Routing/Balancing: A proof-of-concept for sharding with real-time visualization.
- Augur Pro: A user-friendly IOS app for Augur, a decentralized prediction market.
- CryptoPay: A DApp aiming at accepting payments in any token and anywhere. Any ERC20 token payed can be atomically swapped to Ether and a stable coin, DAI, which are more widely accepted by merchants.
- Gifty: With the URL
gifty://, anyone can send NFTs such as CryptoKitties over SMS or in a chatroom!
- Harberger Ads: A market place where everyone can sell your ad space, purchase ad spaces, or even replace others’ ad with a higher price!
- Kora: A DApp for distributed decision making. Users can submit proposals and different stake holders can vote for their preferred choice, along with a comment on the reason of their choice.
- Safu: A browser extension that keeps track of all your crypto addresses like 1Password, and is faster in fetching the account balances than MetaMask.
- SayToshi: Let crypto influencers earn money by selling access to their Twitter accounts. Anyone can pay to let some famous people tweet.. LoL
- SendPut: They built an NPM module for issuing micro-loans for individuals so they don’t have to wait for a company to reimburse them.
- SplitterConverter: When you start a project and want to ensure your contributors they will receive the shares as promised, you can deploy a smart contract specifying the list of receivers, their percentage shares, and the desired currency they each want.
From the above, it is obvious that almost all winning projects have a goal to let Ethereum/crypto adoptions become mainstream by having a user-friendly interface and targeting a real world problem to solve. Instead of proposing new protocols to solve a specific problem for developers, these projects combines and implements the existing great ideas with a mindset of making blockchain easily accessible for everyone.
Now you have a general overview on the workshops in the hackathon, the concepts and possible tools for implementing atomic swap, and the observations from the summary of top 10 winning teams.
Any comment or suggestion is welcomed, and definitely let me know if I missed something important!! :)
Btw, the Palace of Fine Arts (where the hackathon took place) is astonishingly beautiful… start missing ETHSanFrancisco now… A big thank you to all of the organizers and I can’t be more excited for the next ETHSingapore!!