I’ve spent the last 12 months telling anyone who will listen to me how Ethereum is going to change the world. I’ve received puzzled looks, skeptical shrugs and lectures on money laundering, but alongside these, scattered like gold dust, there have been sparks of interest, followed by engaging and thoughtful discussion.

Over this time I have also given out small gifts of Ether to friends and family. Whilst they often start by being most interested in the price (which is very exciting) I’ve found that for quite a few people this then transitions into a deeper interest. People start reading the Reddit threads, looking at YouTube videos and exploring Ethereum and cryptocurrency as a whole. They have their personal flippening moment and fall down the crypto-currency rabbit hole!

Since it is the season to be jolly, the team at Enclaves thought it would be fun to build a little dApp we called Gitf, which lets anyone with Ether quickly and easily create a smart contract that can be used to gift Ether to a lucky friend!

Give The Gift Of Hodling

This gift smart contract has the following features:

it can hold as little, or as much Ether as you want.

it has a lock time, before which the Ether cannot be withdrawn.

it has a text message which can be read using etherscan.io, myetherwallet.com or Mist.

there are no fees or commissions involved, other than the gas cost to create the gift contract (which can be quite high given the high transaction fees at the moment).

Once you’ve generated the gift smart contract, Gitf gives you the option to print out a voucher with all the details you need to give to your lucky recipient. This voucher includes a QR code for the recipient, a QR code for the gift contract, and a QR code that can be used to withdraw the Ether (using myetherwallet.com).

We think that this helps to demonstrate both the concept of a smart contract (their Ether is held by an autonomous entity on the blockchain governed by fixed and transparent rules) and get people interested in Ethereum as they now have skin in the game. How long you set the time lock for (or even whether you set a time lock at all) is of course up to you!

As an added bonus the gift message is stored in the gift smart contract along with the Ether, and will persist as long as the Ethereum blockchain is stored somewhere by somebody, which we think will be a very long time indeed!

The code works by calling the giftEth function of the GiftEthFactory contract on the blockchain (which we’ve deployed). This contract will create a new unique smart contract to hold the gift message and which is only redeemable by the specified recipient, after the lock time has passed.

From a security perspective we’ve taken the following steps:

code for the GiftEthFactory and dynamically created GiftEth contracts is super simple.

and dynamically created contracts is super simple. everyone gets their own unique GiftEth contract.

contract. we’ve registered an ENS name for the GiftEthFactory which is enclavesgitf.eth.

which is we created the GiftEthFactory contract on both the Ropsten TestNet, and the MainNet, so that you can test on Ropsten first if you want to.

contract on both the Ropsten TestNet, and the MainNet, so that you can test on Ropsten first if you want to. the code for GiftEthFactory is verified on etherscan.io and we’ve also verified code for an example GiftEth contract (which will be picked up by any other new GiftEth contracts as the byte code will be identical).

You can find the full code, deployment scripts and unit tests at:

https://github.com/enclavesio/gitf

Have fun using this, and let us know any thoughts or comments below. You can also sign up to receive the latest news from Enclaves and early access to future labs on our website enclaves.io.

Happy Holidays!

The Enclaves Team