Building a faucet for Alephium blockchain

Benoit Perroud
2 min readMay 15, 2021

I learnt about Alephium blockchain few weeks back, and I felt in love with the project. Not only because the project is really promising, but also because it was at the beginning and many things still needed to be built around. And I love building things around. For instance a faucet.

A faucet, in a nutshell, is an application which gives coins or tokens for free to a given address. They usually operates on test network or testnet, to allow anyone wanting to run any kind of tests to have tokens available quickly.

For the Alephium faucet presented here,Twitter is used as the request interface: anyone with a Twitter account can request Alephium token by tweeting a message including the hashtag #alephium and the address the tokens must be transferred to.

Tweet from Cheng, father of Alephium, testing the faucet: https://twitter.com/wachmc/status/1392357526570668032?s=20

Rate limitations

In order to avoid abuse, usage of the faucet is rate limited, to

  • 1 transfer per 24 hours per address
  • 1 transfer per hour per Twitter account

Internal (technical) details

The Alephium faucet application is a standalone application, talking to an Alephium node API.

In blue in the diagram below, the Alephium faucet is connected to the Twitter API and listen to all tweets containing the hashtag #alephium.

Tweets are parsed, and if one contains an address (46 alphanumeric characters, the first one being a T to distinguish testnet from mainnet), a transfer to this address is submitted to the Alephium node, which in turn makes sure the transaction is added to the blockchain.

Alephium faucet application and its dependencies

The faucet address is getting token from the mining of the full node it is connected to. If you’re interested in running an Alephium full node, checkout this tutorial: https://touille.io/posts/how-to-run-alephium-full-node/

--

--

Benoit Perroud

I’m building and running Kubernetes, Kafka, ElasticSearch, Hadoop & Friends @sqoobaio