Author

Topic: atomic transaction / staking rental (Read 1248 times)

legendary
Activity: 1066
Merit: 1050
Khazad ai-menu!
February 18, 2015, 09:52:36 AM
#1
This question relates to a type of smart contract around atomic cross chain transaction I am trying to develop.  
I'm looking for comment on the feasability and implementation security.

Alice wishes to rent out coin on some chain lets call it PPC, in exchange for BTC from Bob (for example).

Bob creates a time locked transaction for some agreed upon amount of BTC to be given to Alice, in the event that he fails to return the PPC in a timely manner.  
This transaction is a smart contract that automatically deletes itself if a certain amount of PPC arrives to an address controlled by Alice.  
It also arranges for a fee in BTC to be given directly to Alice for her service of renting out the PPC.    

In an atomic transaction, Alice reviews and signs this transaction and adds a signed portion giving the PPC to Bob.

Bob reviews the whole thing, adds his signature, and posts to the relevant networks.  In the process, he pays the fee in BTC, collects the PPC, and locks his collateral in BTC into the network.  

Now, Bob can use the PPC for staking for a short time, Alice knows she will receieve either the agreed upon amount of PPC back or the collateral BTC held in the TX.  
Bob knows he will get the collateral back by depositing the PPC to Alice's agreed upon address.


Can this work?

The only hard part is making a smart contract which can watch both chains.  If it is possible, it seems to me this is has great importance in analysis of proof of stake network security.  

-- funkenstein the dwarf
Jump to: