Inspiration

It is holiday season. Quite often, I send and receive various gift cards, such as Amazon Gift Cards or Apple Gift Cards. With Cryptogifts, I want is to make it possible to make it as easy to gift crypto to friends.

What it does

Cryptogifts allows sending crypto to people without knowing their wallet address.

In the app, you can create a gift card sending the gift value to the contract, plus some extra to cover the fees that would be needed for redeeming the gift. You get a link with a code in return. The code contains the gift key and information about the chain where the gift is stored. With this link, a person can request funds to make a transfer if their wallet is empty, or redeem the gift when having sufficient funds to make the contract call.

How we built it

The app is composed of a smart contract (fully covered with tests), front-end interface built with Svelte. The interface is deployed to Firebase Hosting, and the backend is deployed to Cloud Functions.

Challenges we ran into

The main challenge of this project is the fact that a person with an empty wallet cannot make changes to the blockchain. This is a necessary limitation and the key problem to solve for this project.

Accomplishments that we're proud of

The front-end of Ethereum apps is dominated by React. To build Cryptogifts I used Svelte in conjunction with RxJS, which feels like the perfect combination for a web app front-end. It allows creating composable observable streams of data and display the data in the interface with minimal overhead. To build the app with Svelte it was necessary to create some things from scratch, which otherwise would be available off the shelf in React world.

Also, the initial goal was to make the app work with any chain, so the project structure is done in a chain-agnostic way, where Ethereum (EVM), is just one of many possible projects.

What's next for Cryptogifts

Currently, the contract is deployed to Rinkeby, Ropsten, Kovan, and Avalanche Fiji testnets. The contract is functional, but only supports transfer of ETH.

The goal is to make this project work with any chain - EVM and beyond, and allow for transfer of any assets that any given blockchain supports - ERC20, ERC721, etc.

Built With

Share this project:

Updates