Professional Documents
Culture Documents
Verification steps
OP_0
Signature of Spender
Signature of Issuer
OP_2
Metadata1
Metadata2
Spender-pubkey
Issuer-pubkey
OP_4
OP_CHECKMULTSIG
OP_HASH160
Redeem Script Hash
OP_EQUAL
Generic Contract metadata format
Field Sub-field Bytes Value
Metadata1 ContractType 4
ContractPointer 16
ContractTypeData1 12
Metadata2 ContractHash 20
ContractTypeData2 12
Comments
Indicates Fiat Currency
IPv6 address of the actual contract file location
Coded value indicating currency (e.g. 0x0001=CAD, 0x0002=PHP, etc)
Coded value represents the BTC/fiat pegging rate.
Coded value represents type of output (issuance/payment/redemption)
Spare bytes
RIPEMD-160(SHA256(the actual contract file addressed by ContractPointer))
Spare bytes
Comments
Bitfield allocates inputs to outputs, starting with rightmost bit
Comments
Indicates an Issuance output (coloured coins being minted)
Indicates a payment output (transfer of coloured coins)
Indicates a redemption (Issuer pays fiat currency equivalent to bearer)
To minimise the bytes needed, the rule is as follows:
One bit will be used as a flag:
1 = rate expressed as Satoshis/cent (‘cent’ means min. fiat amount)
0 = rate expressed as Cent/Satoshi
Examples:
CAD 100000102 means rate of 100 satoshis/cent (flag is on)
PHP 000000002 means rate of 1 centavo/satoshi (flag is off)
IDR 000000012 means rate of 10 rupiah/satoshi (flag is off)
ID-102
50,000
Output script length
OP_HASH160 <redeem script hash> OP_EQUAL
ID-103
10,000,000
Output script length
OP_DUP OP_HASH160 <PubK-Issuer hash> OP_EQUALVERIFY OP_CHECKSIG
In this example, Alice does not pay the miner's fee. Exactly how we will handle these fees, and how we
will pass the cost onto the client (i.e. Alice) is a business decision and there are several alternatives.
For the current case we have assumed the following:
1. Clients pay a membership fee for using the service and 'straightforward' transactions do not incur a
separate fee. ('Straightforward' needs to be acuurately defined, but it excludes, for example, FX
transactions for now).
2. The Issuer funds the transactions from a pool of uncoloured bitcoin
Output 0 and 1 are coloured coin transactions for the payment to Bob and the change back to Alice.
Their inputs were from coloured coins. Output 2 is uncoloured and originated from an uncoloured
output; it is the 'change' on spending some of the Issuer's bitcoin, so that an amount can be taken by
the miner for a fee. Miner's fee must always originate from an uncoloured coin and therefore will be
spent as unoloured by the system.
Originating transactions (transaction-id / Satoshis amount / script length / locking script)
ID-201
50,000,000
Output script length
OP_DUP OP_HASH160 <PubK-Issuer hash> OP_EQUALVERIFY OP_CHECKSIG
An alternative procedure would be to first mint the coins by making an Issuer-to-Issuer payment
converting uncoloured to coloured coins, and then a regular transfer of the coloured coins to the client
(i.e. issuer-to-client payment). The final procedure is TBD.
Either way, this transaction must be accompanied by a deposit of the fiat amount from Bob to the
Issuer, who will then deposit it into their 'Reserve' bank account.
The metadata indicates that the output is an issuance (thereby enforcing that the originating
transaction must not be coloured).
Originating transactions (transaction-id / Satoshis amount / script length / locking script)
ID-210
10,000,000
Output script length
OP_HASH160 <redeem script hash> OP_EQUAL
ID-110
9,999,000
Output script length
OP_DUP OP_HASH160 <PubK-Issuer hash> OP_EQUALVERIFY OP_CHECKSIG
Transaction: Redemption: Bob cashes in his $1000 worth of coloured bitcoin (option 1)
ID-310
Version number
2
ID-210
IDX-00
Script length
OP_0 Sig-Bob Sig-Issuer <OP_2 metadata1 metadata2 PubK-Bob PubK-Issuer OP_4 OP_CHECKMULTISIG>
00000000000000000000000000000001
ID-110
IDX-02
Script length
Sig-Issuer PubK-Issuer
00000000000000000000000000000010
2
10,000,000
Output script length
OP_DUP OP_HASH160 <PubK-Issuer hash> OP_EQUALVERIFY OP_CHECKSIG
9,998,000
Output script length
OP_DUP OP_HASH160 <PubK-Issuer hash> OP_EQUALVERIFY OP_CHECKSIG
LockTime
Transaction-ID
Version number
Number of inputs
Prev Trans Output
Prev Trans Output index
Script length
ScriptSig
Sequence number
Prev Trans Output
Prev Trans Output index
Script length
ScriptSig
Sequence number
Number of outputs
Output value
Output script length
Output script
Output value
Output script length
Output script
LockTime
Transfer Example 3: description
In this version, the coloured coins are redeemed in one step by a payment from the payer back to the
issuer converting the coloured coin to uncoloured by providing a P2PKH script as the locking script. In
this case, there is no TransactionType as there is no metadata field associated to the output. Therefore
the fact that it is a redemption must be inferred from other implicit data, such as the fact that the
spender is spending a coloured output by using a P2PKH locking script paid to the Issuer.
Originating transactions (transaction-id / Satoshis amount / script length / locking script)
ID-210
10,000,000
Output script length
OP_HASH160 <redeem script hash> OP_EQUAL
ID-110
9,999,000
Output script length
OP_DUP OP_HASH160 <PubK-Issuer hash> OP_EQUALVERIFY OP_CHECKSIG
ID-110
9,999,000
Output script length
OP_DUP OP_HASH160 <PubK-Issuer hash> OP_EQUALVERIFY OP_CHECKSIG
Then to spend this uncoloured output, the issuer will use the following SigScript:
As the TransactionType in the metadata = '0x03' (i.e. the originating output was a redemption) then
by definition this bitcoin is already uncoloured.
Generic Contract metadata format
Field Sub-field Bytes Value
Metadata1 ContractType 4
ContractPointer 16
ContractTypeData1 12
Metadata2 ContractHash 20
ContractTypeData2 12
Comments
Indicates Race horse
IPv6 address of the actual contract file location
e.g. 0x0064 indicates 100 shares
Coded value represents the BTC/share pegging rate.
Coded value represents type of output (issuance/payment/redemption)
Spare bytes
RIPEMD-160(SHA256(the actual contract file addressed by ContractPointer))
Spare bytes
Comments
Bitfield allocates inputs to outputs, starting with rightmost bit
Comments
Indicates an Issuance output (coloured coins being minted)
Indicates a payment output (transfer of coloured coins)
Indicates a redemption (Issuer pays fiat currency equivalent to bearer)
Contract names the Race Horse and details of the ownership rules, etc.
Examples:
100000102 means rate of 100 satoshis/share (flag is on)
000000002 means rate of 1 share/satoshi (flag is off)
000000012 means rate of 10 shares/satoshi (flag is off)
Comments
Indicates Concert Ticket
IPv6 address of the actual contract file location
Indicates exactly 1 share - i.e. this token is not divisible
Coded value represents the BTC/share (for non-divisible tokens always 1/1)
Coded value represents type of output (issuance/payment/redemption)
Spare bytes
RIPEMD-160(SHA256(the actual contract file addressed by ContractPointer))
Spare bytes
Comments
Bitfield allocates inputs to outputs, starting with rightmost bit
Comments
Indicates an Issuance output (coloured coins being minted)
Indicates a payment output (transfer of coloured coins)
Indicates a redemption (Issuer pays fiat currency equivalent to bearer)
Contract specifies performer, venue, date… and other ticket details
Examples:
100000102 means rate of 100 satoshis/share (flag is on)
000000002 means rate of 1 share/satoshi (flag is off)
000000012 means rate of 10 shares/satoshi (flag is off)