Idea

So, the idea itself is very simple. The Dapp enables you to send crypto (MATIC etc) to any person (Alice) without a wallet. You deposit funds into the Dapp and it sends a link to Alice's email id. Alice clicks the link and enters the password (you would communicate this password to Alice separately). The Dapp generates a key-pair on Alice's machine and sends the crypto you had deposited to this newly generated public address. Only Alice has the private key which she now has to use to create a wallet on, for instance, Metamask. While we wait for Alice to redeem the crypto, we deposit the funds into Bentobox to earn interest. Also, if Alice doesnt redeem the crypto in, lets say, 5 days (Chainlink Keepers helps automate the check after the wait period), the crypto is refunded back to you. Finally, we buy $KLIMA using the interest that was earned from Bentobox and maybe burn it. This way we also help do our bit to save the climate using money legos while we onboard more people into the crypto ecosystem.

Inspiration

And thats the basic motivation too - help onboard more people into crypto by removing the necessity of a fiat-on ramp, use the concept of money legos to earn passive income, and then use this passive income to remove carbon offsets from the market (the carbon offsets, in this case, represented by the KLIMA tokens). The Dapp can even act as an onboarding tool for new DAOs being created everyday which need easier ways to get more people into the ecosystem. It can also be used by firms/companies looking to reward loyal users in crypto (as part of some loyalty programme) but dont know whether they have wallets already. This is a cool use case because it completely avoids fiat on ramp which can be a challenge in many developing countries where people might not have access to the crypto ecosystem through traditional banking systems because of regulations.

Tools used to build

We built it using a basic react front end, ethers.js for communicating with the solidity backend alongwith bentobox and chainlink keepers. The server simply serves the pages to the browser. All the logic is client side or on the blockchain. The poc is deployed on the polygon testnet.

What we learned

Being relatively new to developing on the blockchain there were many beginners' hiccups - from configuring and getting the keepers to work, to understanding how bentobox works, fitting all the pieces together, communicating from the front-end using ethers.js, understanding abi encoding and integer math, ERC20 logic, concept of wrapped tokens., etc.

Challenges faced

Developing on the blockchain is very different compared to a traditional client-server model. Testing was a challenge since every change has to be redeployed and the new ABI made available to the front end. All actions cost crypto - so have to take cognizance of this while writing and testing code.

Achievements

The project was very satisfying not just because it achieves a decent demoable version of the whole idea but also because I learnt so many new things, concepts, protocols and a blockchain developer's mindset. It also helps us do our bit for the climate using KLIMA since we will be buying and burning the KLIMA using the passive income thereby permanently removing carbon offsets from the market.

Whats next for Magic Pay

There is still lots to do:-

  1. Bug fixes
  2. Using a neutral account which provides gas for the redemption of crypto by new users
  3. Option to send any token (presently just matic)
  4. Achieving gas efficiency while interacting with bentobox and buying KLIMA
  5. Refactor
  6. Deploy on L2

Built With

Share this project:

Updates