Merchants who accept credit-cards do so by storing a token that is retrieved from a third-party processor (stripe, paypal, etc), this token is used to grant access to pull payment from the cx’s credit card provider and move funds to the merchant account. Having users sign input data acts in a similar fashion and enables that merchant to store the signature of the concatenated bytes hash and input data used to generate the hash and pass them off to the contract holding the subscription logic, thus enabling a workflow that is similar to what exists in the present-day legacy web. This solution has been mimicked using the Tezos ecosystem. There are several advantages for the users:
There are advantages for the founders as well:
Having implemented this it can be integrated with the Tezos QF/Grants System. It can also be used to execute day-to-day subscriptions such as Netflix to pay in tokens with integrated price-feed oracles.
There were multiple challenges I faced with this project. Altogether it was an amazing experience and each one of these challenges gave me deeper insight into how the Tezos Ecosystem worked. First phase of the project while designing the smart-contracts I had to learn how to replicate returning values like how it's possible in Solidity. The documentation and medium articles along with help from @Heisenburg really helped me through this. I faced issues in figuring how to pack data. Michelson is a functional language and is not very easy to comprehend in such a short time. This I had to learn how to generate proper signatures based on my Data. The Tezos documentation and help from global peers really helped me get over this challenge. @ClaudeBarde helped me figure this out. After this was the question of using the right Signer for my functions. Taquito integration was made easy by the wonderful documentation provided. @Aditya helped me out with the integration, deployment and figuring out certain fundamental parts of my front-end. I couldn't have done this without the support of my mentors who took out time to help me out even at 12 AM.
Technologies used
Discussion