Yello guys, hope you all are doing great and out of a hollow because of a mellow kicking you to euphoria. No pun intended 🥴.
We all get inspired to initiate an amount of creativity by some sort of muse. Well, this post was inspired by a list of groovy thoughts:
- Create an Ethereum Token (Swac Coin 😜).
- Using Ethereum tokens to replace Vouchers in establishments or enterprises.
- Thinking further of creating a custom blockchain payment system using NFC’s.
To know a little bit about NFC’s check out this link .
So to kick off, I have a little story to tell. I once attended a boarding school for some years during part of my secondary education.
The school I attended made use of a voucher payment system for within school purchases. It required students to pay in money( real cash) to the bursary office during resumption.
The cash paid is converted to vouchers for the student to utilize for daily school expenses. The voucher was a printed paper with a text written on it to denote its value.
Well, there are some advantages that this system has:
- The school’s grocery vendors receive money in voucher currency. In this way, the school accounting department tries to prevent the school vendors from keeping away some cash during stock taking.
- It also prevents students from purchasing things that are off the radar of the school’s stores inventory.
- It allows students to receive vouchers on a timely basis until their initial paid cash equivalent is exhausted.
Well in reality people still smuggle in real cash but see an outline of its disadvantages below:
- Vouchers can still be stolen like real cash
- Counterfeit Vouchers can be made by students
- They can easily be torn (printed vouchers)
- High burden of security consciousness
So after delving a little bit into the Ethereum planet. I began to imagine a custom replacement to the voucher-based system in my school.
Instead of having a voucher-based system, a custom Ethereum token can be used. Students would be given an NFC card during their registration.
The NFC card would store a token address which would be unique to each registered student. The NFC card would be deemed to be a physical wallet, a proxy for payment ( juxtaposed to an ATM card).
During the registration process, the students would need to create a one time password that would be used to permit transactions using their NFC card.
Since this is a custom payment system, a custom Point of Sale (POS) machine would need to be created to permit students to make payment in school shops.
If the Ethereum contract is deployed on the main-net, parents of students can transfer money to the contract of the custom Ethereum token, with this students can easily call their parents for financial support.
Parents sending money to the main-net isn’t the only way to buy more tokens for his/child. It all depends on what the school wants.
Student A gets registered as a student of School B. During the registration process, Student A’s parent pays in money to the bursary department of school B, the school gives student A an NFC payment card which serves as a blockchain wallet for student A.
The student is requested to create a one time password for the NFC payment card. The password would be used in the POS machine of the school’s shop to permit transactions.
The wallet can permit transactions up to the equivalent amount deposited by student A’s parent.
Student A goes to School B’s shop to purchase snacks. The student is requested to place his/her card on the POS machine with a request to insert student A’s password to permit the transaction. Let’s say student A has 10 token coins before the transaction. If the snacks cost 2 token coins, then after the transaction, student A would have 8 token coins available for future purchase.
In the future, after student A has consumed his/her token, student A can contact his/her parent to transfer more money to his/her account. This can be achieved by student A’s parent transferring some ethers to the contract’s address of the token on Ethereum’s mainnet.
An alternative method of abstraction could still be used to prevent parents from dealing with creating an Ethereum account. A payment gateway company can be used.
Benefits of using the custom Ethereum blockchain token
- Unlike using vouchers that can be torn into pieces, using the NFC card prevents that, and even if misplaced, the student can request for a new NFC card with the same address.
- Students can’t use a students NFC card if stolen without knowing its access password.
- Counterfeit tokens can’t be made since it is secured by the blockchain architecture.
- School doesn’t need to worry about printing vouchers, a single card can handle all transactions
- The school’s shop seller doesn’t need to count the cash because a custom POS system is provided.
Adopting this system would need the school to set up some new infrastructure to support it but I believe it has more benefits to offer than its downside.
To make clients and developers easily build tokens (eg USDT) on top of the Ethereum blockchain, a standard was created to help make this possible.
It is called the ERC-20 standard.
It details the interface that an Ethereum token should adhere to. You can see it here.
So using the standard I decided to create my custom token. Just to try and see 😂. The code below is the contract for my Swac token.
NB: My contract doesn’t handle overflow situations of uint and a little adjustment can be made to the approve function to prevent this attack
I might consider building the NFC payment machine as a school project. I think it is cool.
If you like my thought on this please do share this post and if you have a comment to make please do 😁.