Introducing ERC20 Locks

Creators can chose any Ethereum based token when they sell keys to their locks.

Julien Genestoux
Unlock
4 min readJun 14, 2019

--

When creators deploy their locks using our dashboard, they can chose the following:

  • the name of their locks,
  • how long each key is valid (from seconds to centuries!),
  • how many keys they are selling (with the ability to sell an unlimited amount),
  • and, more importantly, the price of these keys

Up until today, the price of the keys had to be in Ether. Today, we’re happy to announce that we now support any ERC20 token as the currency for the price. As a creator you can now sell access to your content or features inside of your (d)applications using BNB, MKR or even BAT…

Using stable coins

Out of ERC20 tokens, there is a category of tokens which is special: stable coins. These tokens have a value that is designed to be stable, most often against US dollars. Some of them are actually backed by financial organizations who guarantee a 1 to 1 exchange (such as USDC for example), while others are based on on-chain collateral (DAI is a good example of that!), while finally, a 3rd category is based on seigniorage: the supply expands and retracts based on price fluctuations. Learn more about stable coins with this overview from Multicoin Capital.

A lot of the creators that we spoke to were worried about the use of fluctuating currencies. If the price went down, they would lose some of their revenues, and if it went up, they were rightfully worried that their customers may not end up buying keys from them… as they could be waiting for appreciation of their tokens.

We believe that many locks will end up being priced using stable coins, which is why our dashboard UI will let creators pick DAI as the currency.

Bringing utility to “utility coins”

We also strongly believe that many ERC20 currencies are “community” currencies. Their value is rooted in the fact that it has a very specific use. For example, MKR is a governance token which lets owners of it vote on changes in the Maker systems.

Now, nothing says that the MKR tokens, which are actively traded on several exchanges could not be used for other purposes, such as purchasing access keys. For example, Maker could organize a launch party for their upcoming multi-collateral currency where tickets are sold using MKR. For this, they could use Unlock’s ticket application

Get started today

Head out to the creator dashboard now and click on the Create Lock Button:

Then, select DAI as the currency when picking up a price:

Our UI suggests DAI, but the contracts support any ERC20 on ethereum!

Choose how much you want to charge (you can still change that later, but not the currency…). And hit submit. Once that transaction has been mined, your lock has been deployed!

After you have embedded the lock on your page, your readers are offered the ability to Unlock it:

$1/day!

When clicking on it, they are required to approve 2 transactions (the ERC20 spec could be a bit simpler… but we have ideas on how to solve that!):

  1. They need to approve the lock to withdraw some of their DAI (just the amount for the key purchase!):
We’ll soon introduce the ability to only approve once for all of the locks that a customer may be using with the same ERC20 currency!
  1. Actually purchase the key (the lock contract will withdraw the right ERC20 balance):

Once the transaction as been confirmed, the customer will receive their access key (non fungible token), exactly like for any other Ether lock!

We’re very excited about this release, because it opens the door to several other releases in the next coming weeks! Stay tuned ;)

--

--