zack-bitcoin/amoveo

a channel offer that anyone can accept, trust-free

Closed this issue · 1 comments

Hard update idea.
Another tx that does nearly the same thing as new_channel_tx, but the hash of a contract state is embedded into it, and the second person to sign the tx also needs to provide a signature over this contract state.

This way channel formation can be anyone-can-spend.
If I want to buy stablecoins, I can publish the contract and new_channel tx somewhere public. Then anyone can accept my contract and buy stablecoins while I am offline.

This way you don't have to deal with people reneging on their offers to trade.
You can tell a trade offer is valid by looking to see if the tx is valid.

We can combine this with n-lock-time, that way the txs expire and become invalid, that way we don't in-inadvertently incentivize people to move money between accounts too frequently as a hack to make old txs invalid.

I might have a trick to turn these anyone can spend channels into limit orders.

When you make an offer for a contract, you specify a maximum price you are willing to pay, and you make a rule that the fee paid for this tx must be linearly related to the price that it gets matched at.
So the miner gets more money if you are paying a lower price.
This way, the miner is incentivized to accept the transaction from whoever is willing to give you the best deal for your contract
each block is an auction for the contract

this update has already been merged, but the miner's rules for including txs hasn't been updated yet.