First-ever Lightning Network hackathon in Japan: “Offchain Academy Hackday”: Report
Hosted by Imai-san of Offchain Academy and co-hosted and supported by HashHub, the first full-scale Lightning Network hackathon in Japan was held on September 29 and 30, 2018.
Companies and groups that conduct research and development on Lightning Network (LN) are on the rise in Japan as well. However, there aren’t that many developers who understand LN technology yet, therefore this time we aimed to host an event which serves as an entry to LN development for those who are “interested in LN and have experiences developing using web services and APIs”
The judges included companies such as Nayuta, IndieSquare,chaintope that are at the forefront of Bitcoin and LN development in Japan, who helped our event by providing technical advice to participants and APIs as well as reviewing of presentations.
A total of 30 developers in all gathered in this event. They learned the basics of LN for two days to the point of implementing Lapps each team came up with. We certainly had a very high-energy and high quality event.
Overview of Event
During the first half of Day 1, teams received a lecture on the basics of how Lightning Network works and developer tools.
Nicolas Dorier, the lead developer of BTCPayserver（BTCPS) as well as HashHub adviser had lectured on the overview of BTCPS and development of LN nodes.
By utilizing BTCPS, one can easily set up Lightning full-node (c-lightning and lnd). At the hackathon, almost all teams used BTCPS for their development.
Lightning Network Basics
Kurimoto-san, CEO of Nayuta, the developer of original Lightning implementation, “Ptarmigan” had lectured us on the basic structure of LN. Structures on Lightning and how Bitcoin onchain transaction works, and what he considers to be the complexities of LN were covered. Also how to set up Ptarmigan which is currently being developed was explained.
Unity SDK for Lightning Network
At IndieSqure, an SDK which can embed Lightning payment in games using Unity are under development. Christian Moss, the CTO introduced actual examples; games which embedded the SDK.
There are already many Lapp games which utilized two-way micropayment on LN, and more Lightening games built with Unity are likely forthcoming.
Introduction of Lapps
We had a lecture from Imai-san, our host, on examples of actual applications of Lapps using current LN. Current representative Lapps such as application to hardware, second-by-second micro-streaming charging, API-by-API charging, and application to games were covered.
Ideathon & Implementation
After basic explanations on LN are covered, teams consisting of a few people were formed, and each team started to brainstorm ideas. At this point, there were still people who didn’t quite understand the mechanics of invoice on LN and how to design a payment channel, but with advice from hosts and judges, ideas started to materialize.
Second half of Day 1 — First half of Day 2: Implementation
Nothing but diligent implementing. The judges of Hackathon placed emphasis on originality of ideas as well as whether works have progressed to the point of actually functioning, therefore teams kept on pushing until the very end.
After two day of workshops, planning and implementation, 7 teams in all presented their achievements in front of us.
1. Auction system using LN
2. The actual scheme is bidding on auctions with transaction on LN. If there were bids above one’s amount, the previous bid will be returned. Transaction fees on LN are cheap, so additional transactions do not cause issues.
3. Because the bid amount must be committed on LN in advance, it is impossible to bid above one’s ability to pay, therefore there won’t be refusal to pay after the successful bid.
4. Future challenges are: it is not trust-less with regard to refund from auction operator without use of smart contracts.
1. Voting system using LN
2. The scheme of real-time voting result tracking using real-time-ness of Lightning
3. In this implementation, payment of 10 satoshi = 1 vote, issuance of invoice (voting request) with LN payment, and real-time view of voting result implemented.
Team Green Freedom
1. Micro-charging service of digital Manga using LN
2. Micro-charging with LN with each scroll of screen. Pay-as-you-read scheme.
3. Also by pressing “Like” on each work’s page, one can donate to the Manga artist as well as use payment as vote. Social-function is added to the micropayment.
4.Actual implementation is complete, and Lightning charge from modiri.fun will be available
1. Devised and implemented a camera which can be used by Lightening charging
2. By installing LN-enabled camera in event venues and theme parks, users can be charged for each photo
3. By utilizing real-time-ness of LN, the photo will be taken the moment payment is received
4. By using such a scheme, it may be possible to devise hardware-on-loan which is based on (monthly) subscription model.
1.Micro-charge service of on-line calls of one-to-many using Lightning
2.By combining with Appear.in, second-by-second charging is done. When session is disconnected, charging stops.
3.It is also possible to use it for not only one-to-one but one-to-many session as well. For example, during live-streaming of Youtubers and game-live-streamers, multiple viewers can be charged for the streaming easily.
4. As for implementing, by using WebSocket, exchange of invoice between distributor and users can be automated
- Combination of hardware and LN. Pay-as-you-use hardware.
- Implemented hair dryer which can be charged each 10 second with LN. Demo successful.
- Using RasberryPi, the plug was hacked, improved so that on/off switch responds to LN payments.
- Influencer ad using LN
- The current influencer ad model has the problem long cycle from appearance of ad to payment, and advertisers have hard time planning in details click-by-click.
- By using LN, it seems possible to have detailed and fast, click-by-click receiving and payment of ad revenue.
- By using implementation of Lit, utilized push-type issuing of invoice
The result of review
We initially were planning to have just a single award, but due to a number of high-level presentations, we came up with HashHub award for two teams on the fly. (These teams were awarded with 1 month use of HashHub space)
Team Cherrychain(LN-enabled Plug and Dryer demo)
Team Kayac (one-to-many online streaming charging with LN)
…and now, the prestigious grand prize of 1st-ever Lightning hackathon goes to…
Team Green Freedom
Not only embedding micropayment with Lightning to digital comics, but they were thoughtful in details such as social functions and error-handling. Also, they successfully implemented functions which are ready to go live, which was seen favorably by the judges.
Since this was the very first Lightning hackathon held in Japan, we didn’t know exactly what level of products we could expect, but the teams surely exceeded our expectations with their products and ideas. We would say it was quite a meaningful event. The member who participated in Berlin Lightning hackathon also commented that this hackathon was on par with overseas hackathons in terms of quality. We believe we are seeing formation of strong developer community in Japan.
Still, what the teams could create in just two days were rather limited, and by continuously hosting hackathons and study meetings, we would like to incubate even higher-level related technologies, products and ideas from Japan to the world.
At HashHub, we plan to not only actively host and support Lightening Network-related events, but set to releasing our own product which will accelerate the use and development of Lightning network, out in October.
Also we would like to actively collaborate with overseas event and hackathons, so if you are event hosts and interested in collaborating, please get in touch with us (email: email@example.com ).