27 – SmartContracts: Idea for Micropayments

From a conversation on Komodo Discord, 16 august 2018:

jl777: Ok, I figured out how to do micropayments, well actually mempool based payments that is secure. I think that will be the next one to do and really, it isn’t limited to small payments, it can work with any size.
But I think I will limit it to 32-bits of 0.0001 denomination -> 4 billion / 10000 -> 400,000 would be the max payment

grewalsatinder: I want micropayments!!!!

jl777: It seems in September timeframe I can get it ready, barring bug barrage from existing codes

grewalsatinder: Can you explain a bit on difference between your idea of micropayments and Lightning Network? From your point of view?

jl777: Mine is a simple approach that most people should be able to understand. no crazy complicated bidirectional channel scripts. it is also a direct p2p approach, so you need to specifically reserve funds for specific payee.
This seems a good tradeoff as I don’t have 3 years to get a micropayments system working, I want to be done in 3 weeks.
The way it will work is you lock funds into a payments address. This can be added to whenever, using similar concepts to the faucetfunding/rewardsfunding.

grewalsatinder: I need micropayments for MESH blockchain. To use directly this assetchain token for micropayments, instead of converting it to CHIPS and back.

jl777: Once you have funds, you then reserve a portion of it for a specific payee pubkey this doesnt send anything, but reserves the stated amount for paying just that one pubkey.
Once that reserve is notarized (or enough confirms) then it can be used for sending a mempool based payment. Even if the chain is reorganized, the mempool transaction just gets processed again, so there is assurance that a payment made, will in fact be valid.
Final piece is to release funds that are reserved for paying a specific pubkey. This has a delayed effect until notarized or enough confirms. Thus mempool payment is assured as the funds for the payment are locked in the CC contract and even if the chain is reorged, the tx will still have the funds from the reserved amounts.
In a sense it simulates account balances, even though it is fundamentally utxo based.

grewalsatinder: So mempools will work like a per second/mil second micropayments?

jl777: More like a couple of seconds, but yes, as soon as it arrives in the mempool (or via whatever side channel), the payment is not reversible.

grewalsatinder: Okay

jl777: I can also have any unallocated funds used toward payments to pubkeys payee that is not specfically reserved. this might get double spent,but for small amounts it would be convenient to not have to setup a reserve.
For such, the normal “until its notarized it isnt permanent” rules would be in effect, but really unless you are transacting with the actual attacker, it will be valid.
So I think for most people most of the time, the unreserved locked funds can serve the purpose for quick instant payments to any destination

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s