Title: How to transfer share holdings within the block chain (second attempt) Post by: grondilu on December 21, 2010, 04:51:06 AM I was not very much convinced by my proposal for a system to transfer assets with the bitcoin network, so here is an other idea.
The asset is defined somewhere on cyberspace, with a full textual description. In this text there is a bitcoin address where coupons/dividends/whatever are to be paid. In order to transfer this asset, the owner basically just have to change the bitcoin address it is assigned to. I'll use again the idea of coding information into the amounts. So basically we need to code a bitcoin address into transactions amount. Let's take the following address as an example : 1Hy9dexzNzjvQYkYy6zKRVZMU8k2j5vuPt We turn it into hex : $ openssl dgst -rmd160 <<<1Hy9dexzNzjvQYkYy6zKRVZMU8k2j5vuPt a370e25093b51a83e13864ff880afd5b95ff2615 Split it into 4-characters-long parts : $ H=a370e25093b51a83e13864ff880afd5b95ff2615 $ while echo ${H::4}; [[ -n "${H#????}" ]]; do H=${H#????}; done a370 e250 93b5 1a83 e138 64ff 880a fd5b 95ff 2615 Turn them into sequentially ordered amounts : $ n=10 $ for i in a370 e250 93b5 1a83 e138 64ff 880a fd5b 95ff 2615 do echo $((n++*10**6+0x$i)) done 10041840 11057936 12037813 13006787 14057656 15025855 16034826 17064859 18038399 19009749 we compute their sum (we could have done that during the previous step but it is simpler to present it like this for you) $ echo $((10041840+11057936+12037813+13006787+14057656+15025855+16034826+17064859+18038399+19009749)) 145375720 We send this sum from an account called "treasury" to the address : $ bitcoind sendfrom treasury 1Hy9dexzNzjvQYkYy6zKRVZMU8k2j5vuPt 1.45375720 We set an account for it : $ bitcoind setaccount 1Hy9dexzNzjvQYkYy6zKRVZMU8k2j5vuPt testaccount And finally we send the 10 amounts from the testaccount back to the treasury : $ addr=$(bitcoind getaccountaddress treasury) $ bitcoind sendfrom testaccount $addr 0.10041840 $ bitcoind sendfrom testaccount $addr 0.11057936 $ bitcoind sendfrom testaccount $addr 0.12037813 $ bitcoind sendfrom testaccount $addr 0.13006787 $ bitcoind sendfrom testaccount $addr 0.14057656 $ bitcoind sendfrom testaccount $addr 0.15025855 $ bitcoind sendfrom testaccount $addr 0.16034826 $ bitcoind sendfrom testaccount $addr 0.17064859 $ bitcoind sendfrom testaccount $addr 0.18038399 $ bitcoind sendfrom testaccount $addr 0.19009749 Finally all we have to do is to write a programm that inspects the block chain in order to trace the full transaction log of the asset. Title: Re: How to transfer share holdings within the block chain (second attempt) Post by: theymos on December 21, 2010, 05:35:08 AM "sendfrom" doesn't actually send bitcoins from a particular address/account. It just reduces the account's balance after sending.
If you can send from a particular address, you could just send a pre-set number of bitcoins from the old owner to the new owner. The stock broker watches the block chain for transactions of a certain amount from the current owner, and whoever first receives coins of the proper amount from that address becomes the new owner. Title: Re: How to transfer share holdings within the block chain (second attempt) Post by: grondilu on December 21, 2010, 06:19:25 AM "sendfrom" doesn't actually send bitcoins from a particular address/account. It just reduces the account's balance after sending. Ah, my bad. Isn't there really no easy way to send amounts from a particular address (apart from creating a wallet with only one address) ? Title: Re: How to transfer share holdings within the block chain (second attempt) Post by: ribuck on December 21, 2010, 12:03:33 PM Isn't there really no easy way to send amounts from a particular address You need to patch the bitcoin client yourself and recompile. If you do this, I think there are quite a few people who would be interested in using your patch. Title: Re: How to transfer share holdings within the block chain (second attempt) Post by: ByteCoin on December 21, 2010, 03:34:55 PM There are a variety of different ways of encoding information in a normal transaction in the block chain.
Encoding the information as fractional amounts of bitcoin in transactions has several disadvantages. It is inefficient - the amount of information encoded per transaction is small. It is obvious - small transactions which are not round amounts of coin are not typical. It can be discouraged by fees on small untypical transactions. Another way would be to send a small amount of bitcoin to an address, were the address is the information to be encoded. This would store about 20 bytes per transaction. A superior way would be to use the broadband subchannel in ECDSA which I wrote about in http://bitcointalk.org/index.php?topic=1545.msg18364#msg18364 This allows you to store 32 bytes per transaction and does not require you to waste any money. Neither of these latter two schemes is obvious, nor can they be discouraged by fees and they are vastly more efficient. ByteCoin Title: Re: How to transfer share holdings within the block chain (second attempt) Post by: grondilu on December 21, 2010, 03:46:27 PM ahh forget it.
I'm about to finish writing my CGI script using GnuPG to transfer share holdings. It's a centralised method, but I think it's fine since the shares are holded in a centralised manner anyway. PS. I'm just discovering openssl. This programm is great. It's kind of a swiss-army cryptograpihc knife. I'll use that instead of GnuPG. |