, 19 tweets, 4 min read
Been working on a bankless Hong Kong Dollar, built on Ethereum: HKDai.

It's the first time I build a dapp end-to-end, so here's a thread with some thoughts + current status.
What is HKDai?

HKDai is a cryptocurrency which - similarly to the Hong Kong Dollar (HKD) - is soft-pegged to the US Dollar (USD) at a rate of 7.8 HKDai to 1 USD.
While the HKD is pegged by the Hong Kong Monetary Authority (HKMA) intervening in markets at certain price points (sell HKD at HK$7.75; buy HKD at HK$7.85), HKDai is 100% collateralized by Dai.

As you probably know, Dai is pegged to the USD.
This means that you can always redeem your HKDai for Dai at a rate of exactly 7.8 HKDai per 1 Dai. This is guaranteed via an open-source smart contract issued on the Ethereum blockchain.
But let's take a step back - why HKDai?

HKDai gives the people of Hong Kong a familiar currency in a digital form, with the benefits of the Ethereum ecosystem.
Specifically, HKDai:
- requires no bank account - only an Ethereum wallet
- can be sent to anyone, anywhere in the world, within seconds
- has a stable value, as it is pegged to Dai at a constant rate of exactly 7.8 : 1
- cannot be blocked or intercepted by any intermediaries
How does HKDai work?

HKDai in its current form is based on a simple smart contract. The main two features of the contract (in addition to standard ERC20 functions) are: deposit and withdraw.
Deposit lets you deposit Dai into the smart contract. You receive exactly 7.8 HKDai for every 1 Dai you deposit. These 7.8 HKDai are minted at the time of your deposit.
Withdraw is the opposite operation: it lets you withdraw Dai from the smart contract. You must return 7.8 HKDai for every 1 Dai you want to withdraw. The HKDai you return are taken out of circulation.
When implemented correctly, this means the HKDai-Dai peg is unbreakable.
What's the current status and future of HKDai?

HKDai is currently in its very first iteration, which means it only supports the bare minimum: deposits/withdraws + basic ERC20 token functionality.
The contract is live on Ropsten, and the screenshot above shows the current basic UI. There are still some things that need to be ironed out before mainnet.

(in particular if you know how to avoid rounding issues when converting between units in Solidity, please DM me!)
Eventually the plan is to include interest-generation on the locked-up Dai (via @Compound), which will be donated to a charitable cause supporting the people of Hong Kong.

Would love to hear good suggestions on good HK organizations - ideally some umbrella org. (Maybe a DAO...)
This also answers *why* anyone would lock up Dai to get HKDai. Having and using HKDai means you are supporting the people of Hong Kong.

At the same time, you can of course use HKDai fully anonymously (or at least pseudonymously).
Does it cost anything to use HKDai?

Only gas. The idea is to be able to losslessly convert between Dai and HKDai.
I should mention this is purely experimental and there's (obviously) no affiliation between the HKD / HKMA and HKDai.

The goal of this is primarily a learning exercise for me + to show what you can easily do with Ethereum.
I've received valuable help from @clesaege on the smart contracts - thank you!

If anyone else wants to help out, please feel free to get in touch.
And if you are interested in getting started with Solidity, I highly recommend checking out Brownie: eth-brownie.readthedocs.io/en/stable/
Let me end by saying that it is mind-blowing that we can create open-source, bankless, transparent, programmable money with just a few lines of code.

In people's struggle for freedom around the world, this might end up being a vital piece of the puzzle.
Missing some Tweet in this thread? You can try to force a refresh.

Enjoying this thread?

Keep Current with Alex Svanevik

Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!