pchain-org / pchain

Pchain client-in-Go
https://plian.org
GNU General Public License v3.0
24 stars 12 forks source link

deposit and withdraw balance with time limit #12

Open pchain-org opened 6 years ago

pchain-org commented 6 years ago

When deposit/withdraw balance from main chain to child chain; we need set a deadline to this transaction.

For example, when deposit, we send the transaction with parameters 'child chain id', 'amount', 'signature', etc. we should add one more parameter 'end block' with integer type. If 'end block' has been reached on main chain and the correspond transaction has not been triggered in child chain, then the transaction should be labled with 'overtime', main chain should unlock the locked balance, and this transaction should not be used by child chain any more.

this applies to withdraw procedure as well.

zebracrossingblog commented 5 years ago

I will propose to add a time begin parameter for deposit (default is immediate), and a escrow address. This will allow delay transactions with a specified time. A user can then decided say to send say 100k PI to a receiver at certain date and time, with the ability to cancel such transaction by a escrow agent only.