I’m thinking about creating a system that keeps track of points for users. Wondering how to architect this with a smart contract. (I’m a bit new in my ethereum journey; so far, I’ve created an ERC-20 token and a React site that can transfer/send these tokens… so not too much experience yet).
The system I’m thinking of will have a website that will have users where these users will be able to gain points and redeem points (basically transfer them to someone else).
Since the points will really “tokenize” something in the real world, this seems to be a good match for a ERC token (20 or 721), I think
It would seem to me that the number of points a user has could be equal to the number of tokens they own
Or, would is be better to somehow keep track of the point value in a different way?
When I say off-chain, I’m referring to the data that will be stored in a database and not on the blockchain (including the ethereum account addresses for users); I hope I’m using the “off-chain” term correctly.
Hoping some of you might have experience/best practices in this and be OK to provide your insight. I appreciate the help!
How does the value of points compare with that of gas? (What is the minimum amount of points to use in a mint/transfer operation to make the transaction fee worthwhile)
Centralized database tracking users points, with users having the option to withdraw points to tokens above a certain threshold e.g. 100 points (depending on their value).
Points purely tracked as tokens on Ethereum mainnet
Points tracked as tokens on a sidechain (e.g. Proof of Authority sidechain such as xDAI, where the network is not trustless but the transaction fees are lower), with potential option to transfer to Ethereum mainnet.
I'm struggling/considering this. What I'm thinking here is that a decentralized solution makes the point value public, for transparency purposes...
as yes, the points would be transferrable to other users.
The usecase I'm thinking about are loyalty points that can be owned by one user but redeemable at/by various merchants...think, earn points at a business and redeem there or somewhere else or transfer to someone else to use.
Thanks for your thoughts on users having Ether as I was seeing this a hard on-boarding issue. I need to think about this so thanks for bringing Gas Station Network up as I did not know about this.
Thanks for the sidechain options as well as pointing to ERC777 as an option (looks like it gets you a two for one transaction that is an atomic approve/transferFrom so that cuts your transaction in half).