If we go to any grocery
store purchase a small item worth ₹ 55
and when you give your card to swipe for payment, the storekeeper would ask you
to render the exact change or buy items worth some value let us say ₹300. Here the storekeeper is looking to avoid the minimum transaction
fee(thereby avoiding the loss that could occur) and you are forced buy unintended items.
What if you are a regular
customer to the store and would like to pay lump sum at the end of month, then
the storekeeper thinks ‘what if he does not pay back’.
What if you would pay some
advance to the storekeeper, good but you might think ‘what if you were unable
to spend the whole amount and shopkeeper doesn’t return the balance’ or ‘what
if you were busy and unable to visit the shop thereafter’ or ‘what if
shopkeeper says he doesn’t know you’.
But won’t it be good if you
can pay only for items that you took whether it is ₹
55 or even ₹
1 for that matter. The topology that
enables such provision is micropayment channel.
To understand micropayment
channels, we need to understand multi-sig technology and lock-time feature of
bitcoin transactions.
Multi-sig
In any transaction a person
holding btc can spend them using his signature, but if an organization or group
of people hold the btc then it might require 2 or more person signature to
spend the btc, and this is possible with multi-sig technology where it requires
m of n keys to spend the btc.
For btc to be added to such
organization, we need to send btc to P2SH (supports arbitrary sets of N keys of
which M are required to transact) instead of P2PKH (single key address).
Lock-time
Lock-Time feature of
transaction makes a transaction inadmissible to the network until certain time,
i.e. only when the lock time has reached the transaction could be added to the
network.
Lock-Time types firstly if
lock time is less than 500 million then it means block height, so transaction
could be added to network after such block height is reached, Secondly if it is above 500 million then it is the time (mentioned in seconds since January 1st
1970) at which it could be added to network.
Micropayment explained
Micropayment enables us to
pay transaction fees only once though you have done several such transactions within
specific time and with the same person, as it facilitates collection of
transaction fee for one final settlement transaction instead of collecting fee
for every small transaction.
Back to the grocery store,
you make a deal with him by writing a transaction that would put 100 m-btc of
your wallet in to a 2 of 2 multi-sig with your key and shopkeeper’s key and if
this is added to network 100 m-btc could be spend only when both you and
shopkeeper sign(Escrow lock).
But before this gets added
to the network you write another transaction that sends 100 m-btc back to your
address (Refund) with one month lock time signed by shopkeeper. So this makes
sure you get your money back if the shopkeeper disappears.
Now keeping the refund transaction with you, upload the escrow lock transaction to the network. So when you go the store, buy some item worth 5 m-btc you sign the transaction that pays 5 m-btc to shopkeeper and 95 m-btc back to you, and give the 1st transaction to shopkeeper who retains it (doesn’t immediately upload the transaction).On your second visit if you buy item worth 10 m-btc now you sign the transaction that pays 15 m-btc to shopkeeper and 85 m-btc back to you, and give the 2nd transaction to shopkeeper who again retains it, after few more such visits let us say after your nth visit and before the lock time(one month) the shopkeeper uploads the nth transaction that pays k m-btc to shopkeeper and (100-k)m-btc back to you, thereby paying the transaction fee only for one instead of n transactions.
Thus we have μ-payment transactions which are beneficial to both the sender and receiver.





No comments:
Post a Comment