<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Curtis Ellis on Medium]]></title>
        <description><![CDATA[Stories by Curtis Ellis on Medium]]></description>
        <link>https://medium.com/@curtis.ellis?source=rss-bf9fcdb3fc1b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*HApb2oJAvuCLEWCDN9z7Gg.jpeg</url>
            <title>Stories by Curtis Ellis on Medium</title>
            <link>https://medium.com/@curtis.ellis?source=rss-bf9fcdb3fc1b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 23:29:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@curtis.ellis/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Non-Custodial Agent Bitcoin Transfer]]></title>
            <link>https://medium.com/tokenized-blog/non-custodial-agent-bitcoin-transfer-afacb9c4c625?source=rss-bf9fcdb3fc1b------2</link>
            <guid isPermaLink="false">https://medium.com/p/afacb9c4c625</guid>
            <category><![CDATA[bitcoin-sv]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <dc:creator><![CDATA[Curtis Ellis]]></dc:creator>
            <pubDate>Mon, 09 Aug 2021 23:54:38 GMT</pubDate>
            <atom:updated>2021-08-09T23:54:38.194Z</atom:updated>
            <content:encoded><![CDATA[<p>When a Tokenized “Atomic” swap of tokens for bitcoin is done the bitcoin must currently be sent to the Smart Contract Agent (SCA) address and the SCA then disburses the bitcoin to the recipient when it approves the transfer, or refunds to the original address if the transfer is rejected.</p><p>We don’t ever want the Tokenized Smart Contract Agent to need to hold bitcoin, at least no more than basic tx fees to function. <a href="https://medium.com/u/1567be47a770">sCrypt</a> provides us a good option to fix this via their higher level <a href="https://scryptdoc.readthedocs.io/en/latest/">language</a>, <a href="https://scrypt-ide.readthedocs.io/en/latest/">IDE</a>, and sample code.</p><p>So this contract can be unlocked in three ways:</p><ol><li>The SCA signs (P2PKH) and includes the output that hashes to the specified “approve” output hash.</li><li>The SCA signs (P2PKH) and includes the output that hashes to the specified “refund” output hash.</li><li>The sender signs (P2PKH) and the transaction specifies a lock time at or after the expiration specified.</li></ol><p>This only allows the SCA to send the bitcoin to one of two addresses and if the SCA doesn’t respond before the expiration the sender can reclaim their bitcoin.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/390cf7865316860028d1eca98e43c433/href">https://medium.com/media/390cf7865316860028d1eca98e43c433/href</a></iframe><h3>How it works</h3><p>Thanks to the breakthrough of <a href="https://xiaohuiliu.medium.com/op-push-tx-3d3d279174c1">OP_PUSH_TX</a> we can create locking scripts that can only be spent by spending them into a transaction the meets the requirements specified in the locking script. These rules are all applied by checking the signature hash preimage, meaning the data that is signed when a transaction is signed and that signature is verified by the OP_CHECKSIG op code. There is a cost as bitcoin script doesn’t directly allow accessing that data. So to check the data the preimage must be included in the unlocking script as well as any data that might need to be examined within a hashed set of data. Then the locking script can verify the preimage in the unlocking script is correct for the current transaction and analyze that data to verify it meets the requirements.</p><p>One piece of data included in the preimage is a double SHA256 hash of the outputs of the transaction. So by using a SIGHASH_SINGLE, that only signs one output, the outputs hash in the preimage is the hash of a single output. In the script above the locking script includes the hashes of two outputs. The locking script then allows spending by providing the SCA key (specified in the locking script) signature as well as the hash of the output of the current transaction to match one of the specified output hashes.</p><p>Other pieces of data in the preimage are the lock time (time before which a tx is not valid to the network), and hash of the sequences of the inputs (only when SIGHASH_ALL). When the sequence of one of the inputs is not the MAX value and lock time is not zero, then the transaction is not valid until the lock time is reached. The locking script then allows spending by providing the sender key (specified in the locking script) signature as wells as specifying a non-MAX sequence and a lock time after the expiration time specified in the locking script.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=afacb9c4c625" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tokenized-blog/non-custodial-agent-bitcoin-transfer-afacb9c4c625">Non-Custodial Agent Bitcoin Transfer</a> was originally published in <a href="https://medium.com/tokenized-blog">Tokenized Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tokenized Demo Technical Details (CoinGeek NY 2020)]]></title>
            <link>https://medium.com/tokenized-blog/tokenized-demo-technical-details-coingeek-ny-2020-4ce07884e2d7?source=rss-bf9fcdb3fc1b------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ce07884e2d7</guid>
            <category><![CDATA[smart-contracts-tutorial]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[token]]></category>
            <category><![CDATA[tokenization]]></category>
            <category><![CDATA[bitcoin]]></category>
            <dc:creator><![CDATA[Curtis Ellis]]></dc:creator>
            <pubDate>Wed, 07 Oct 2020 02:50:41 GMT</pubDate>
            <atom:updated>2020-10-07T22:17:24.945Z</atom:updated>
            <content:encoded><![CDATA[<h3>Tokenized App Demo: Technical Details</h3><h4>CoinGeek Conference Live (2020)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZjnWwvgub6bDkMSVZVRE-Q.png" /><figcaption>A sneak peek of the soon-to-be-released desktop app.</figcaption></figure><p>During James’ <a href="https://youtu.be/FIgesLz9LTc?t=7171">presentation </a>at the <a href="https://coingeekconference.com/agenda">CoinGeek Conference Live 2020</a>, he showed a sneak peek of the Tokenized platform. It was short and sweet, but there was actually a lot going on behind the scenes that I would like to provide some insight into.</p><p>To sum up the demonstration, James drafted and formed a smart contract that issued some tokenized assets — coupons in this case. He then exchanged those newly issued coupons for some tokenized pounds in an on-chain atomic swap with Scott, our Backend Lead Developer. What follows is a step-by-step account of all of the technical actions and events of the demonstration.</p><p>If you are interested, you can view the presentation and demonstration in the video below. There is also an interesting panel right after that discusses the different token protocols currently available on Bitcoin SV.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FFIgesLz9LTc%3Fstart%3D7171%26feature%3Doembed%26start%3D7171&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DFIgesLz9LTc&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FFIgesLz9LTc%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/4ec231df24c701af55f44744e69a8cef/href">https://medium.com/media/4ec231df24c701af55f44744e69a8cef/href</a></iframe><h3>Contract Formation</h3><p>James first created a new contract by simply filling in some of the contract editor fields with sample data and clicking a button to sign and execute. This actually involved several operations on the back-end.</p><ol><li>Fetch the contract address from the contract operator, off-chain.</li><li>Create the contract offer action.</li><li>Request a signature from the contract operator, off-chain.</li><li>Request a signature from the user, through the app.</li><li>Broadcast the transaction to the BSV network and wait for a response from the smart contract agent, which is the on-chain formation of the contract.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uE4WiPzZKnwAa-gJS5h_rg.png" /></figure><p>The contract address retrieved from the contract operator was <a href="https://whatsonchain.com/address/138nAmbmvAzgV8FpXukpnPEX2nznfoafas">138nAmbmvAzgV8FpXukpnPEX2nznfoafas</a>. You can see all of the activity related to it on-chain.</p><p>The contract offer is signed by a key publicly known via the contract operators on-chain contract formation. This is optional, but ensures the identity of the operator is verified and trusted.</p><p>The initiating contract offer is in this <a href="https://whatsonchain.com/tx/e8d4f1cabb5c38004d3465b963211c90bc1e2172fc8c4b6158644df0b3dc7c22">transaction</a>. The parsed offer data from the OP_RETURN output looks like this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c257fb77ae4ed8f073e7effa8ba3be6b/href">https://medium.com/media/c257fb77ae4ed8f073e7effa8ba3be6b/href</a></iframe><p>The first input is the issuer and the second is the contract operator.</p><p>The contract formation response (approval of the contract by the agent) is in this <a href="https://whatsonchain.com/tx/9d38ca0997b0a7241c295a2ceb4b612368bf14268ca804b89343358a85d016ca">transaction</a>. Its parsed formation data from the OP_RETURN output looks like this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4d8598ab84de79cc2a9fd562108488ee/href">https://medium.com/media/4d8598ab84de79cc2a9fd562108488ee/href</a></iframe><p>You can see that the smart contract agent added a few fields that it controls.</p><h3>Asset Creation</h3><p>James also added assets to the contract by entering their names and a few details. The below actions all happened immediately after the contract was formed.</p><ol><li>Create the asset definition actions.</li><li>Request a signature from the user, through the app.</li><li>Broadcast to the BSV network and wait for the response from the smart contract agent, which represents the on-chain creation of the assets.</li></ol><p>I don’t want to make this too long so I will just post one of the asset creations (approval of the asset by the agent). This <a href="https://whatsonchain.com/tx/6168ac645cb00354a9928d32d1ca7627b30103eb0438f98471d96999e8e2f681">transaction</a> is the asset creation, which has the asset payload embedded. The format of the asset payload is specified by the AssetType field.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d97c9664b4eb953c57fa530bd8c17698/href">https://medium.com/media/d97c9664b4eb953c57fa530bd8c17698/href</a></iframe><p>This is the decoded asset payload.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3904e13da8ae0622491a94dbb4ed164e/href">https://medium.com/media/3904e13da8ae0622491a94dbb4ed164e/href</a></iframe><h3>Exchange Tokens</h3><p>After the coupon assets were created, James formed a token exchange offer to send to Scott. Once James approved the request, the offer was sent on-chain.</p><h4>Create Offer</h4><p>James forms an offer to exchange coupons for pounds with Scott.</p><ol><li>Create an incomplete transaction request for a specified amount of pounds to receive, and a specified amount of coupons to send in return. It is incomplete because it doesn’t include recipient outputs for the coupons, sender inputs for the pounds, or any signatures for that matter.</li><li>Since the requested currency tokens are managed by a smart contract that requires transfer recipients are approved by an identity oracle (just for this demo), James includes a certificate (signed message) from the specified oracle (obtained off-chain) attesting to the eligibility of his receiving address.</li><li>Wrap the request in an offer transaction for review. After the inputs are signed by James with the app, it is sent to Scott by broadcasting to the BSV network.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TIp9NohdMriOF8BVRejrNA.png" /></figure><p>Here is the exchange offer <a href="https://whatsonchain.com/tx/74872e1b3860dae61e0aa7d9b0ba66a08165293bc8f796558a55f554dd3019db">transaction</a>. It contains an output with a Tokenized Message that decodes to this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/55aa698d4313d8d4d934daa6204a821e/href">https://medium.com/media/55aa698d4313d8d4d934daa6204a821e/href</a></iframe><p>The MessageCode of 1001 means the MessagePayload is an Offer type. It decodes to this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/aae380bf6f39e71ee1bc0dd873c08c94/href">https://medium.com/media/aae380bf6f39e71ee1bc0dd873c08c94/href</a></iframe><p>The payload of the above message is a serialized Bitcoin transaction that needs inputs and outputs added to be valid. For brevity, I won’t decode the entire thing. It goes a few more levels deep :-). The completed version can be viewed below. It contains a Tokenized Transfer action sending coupon tokens out from James’ addresses and receiving pound sterling tokens into James’ addresses.</p><h4>Accept Offer</h4><p>Scott receives and approves the exchange offer.</p><ol><li>Unwrap request from the offer transaction.</li><li>Complete the request transaction by adding inputs for the pounds to send and outputs for the coupons to receive. Since there is no identity oracle requirement for the coupons, Scott’s outputs are automatically valid.</li><li>Now with all necessary inputs and outputs, Scott’s inputs are signed with the app. Now the transaction is only missing James’ signatures.</li><li>Wrap the transaction in a signature request for review. After inputs are signed by Scott with the app, it is sent to James by broadcasting to the BSV network.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JqrI8bTtmuGO8Dd8PRTToQ.png" /></figure><p>Here is the signature request <a href="https://whatsonchain.com/tx/adeccc9b8abc3c73bdfc639bc6aa0e580e9c23ec5a3729038ec639a01014f25e">transaction</a>. It contains an output with a Tokenized Message that decodes to this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/58893c42e43f64f174424ae7002a6fff/href">https://medium.com/media/58893c42e43f64f174424ae7002a6fff/href</a></iframe><p>The payload is of type 1002, which means it is a signature request. It decodes based on the 1002 MessageCode to this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4ed9317435ebf1c2c325536dac124708/href">https://medium.com/media/4ed9317435ebf1c2c325536dac124708/href</a></iframe><p>The payload of the above message is a serialized Bitcoin transaction. For brevity, I won’t decode the entire thing. It goes a few more levels deep :-). The completed version is below. It contains a Tokenized Transfer action that exchanges the two tokens between James’ and Scott’s Bitcoin addresses.</p><h4>Complete Offer</h4><p>James must still add his signature. He was previously able to add inputs and outputs, but could not sign the inputs until Scott had added his inputs and outputs.</p><ol><li>Unwrap the request from the signature request transaction.</li><li>Sign all of James’ inputs with the app then broadcast to the BSV network.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WoEeRpZVe1DgPoXm3esDFA.png" /></figure><p>The resulting complete Tokenized Transfer request is in this <a href="https://whatsonchain.com/tx/45a918da8221c29a63063d42070da4ac2448755f6218d3137ebcf8f286da294e">transaction</a>. The transfer request decodes to the following. You can see that the required identity oracle approval of James’ receiver addresses is included for the currency transfer.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8cfcdc447606bf5f56e5c983289cc3d9/href">https://medium.com/media/8cfcdc447606bf5f56e5c983289cc3d9/href</a></iframe><h4>Currency Smart Contract Agent Receives Transfer Request</h4><p>The smart contract agent for pounds sterling currency tokens receives the transfer request on-chain and responds.</p><ol><li>Verify that Scott has the required currency tokens to transfer and that the included identity oracle signature for James’ receiving output is valid.</li><li>Create settlement data for the pounds transfer.</li><li>Wrap data in a settlement request transaction and send on-chain to the coupon smart contract agent.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5Ez4pYYqI1_g9V9O7aNQ5w.png" /></figure><p>The Tokenized Settlement Request is embedded in this <a href="https://whatsonchain.com/tx/8e56306573b98e0fd368a55d2a3e32f05b6c4507ae357b973b9cb9c161d78b09">transaction</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/76ca12ad5dc2708be13327124e339b27/href">https://medium.com/media/76ca12ad5dc2708be13327124e339b27/href</a></iframe><p>The MessageCode 1003 means the MessagePayload is a Settlement Request and it decodes to this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/43e8d1a86a953882511d0f0771932914/href">https://medium.com/media/43e8d1a86a953882511d0f0771932914/href</a></iframe><p>And here is the decoded Settlement data.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0e467d683b17e56c40144e72420f4cd8/href">https://medium.com/media/0e467d683b17e56c40144e72420f4cd8/href</a></iframe><p>This combined with the Tokenized Transfer transaction previously received provides all the necessary data for the coupons smart contract to complete the Tokenized Settlement transaction (minus final signatures from the pounds sterling smart contract).</p><h4>Coupon Smart Contract Agent Receives Settlement Request</h4><p>The smart contract agent for the coupons James created receives the settlement request on-chain and responds. This agent previously saw the transfer request, but knew the other agent was first and waited for the settlement request.</p><ol><li>Unwrap settlement data for the pounds transfer.</li><li>Verify that James has the required coupon tokens to transfer. In this case, no identity oracle signatures are required for the coupon recipient.</li><li>Add settlement data for coupons transfer.</li><li>Determine settlement data is complete for all assets, create a settlement transaction, and sign it.</li><li>The settlement transaction is still missing signatures from the pounds smart contract agent, which weren’t possible until the coupon’s settlement data was added, so the settlement transaction is wrapped in a signature request transaction and sent to the currency smart contract agent on-chain.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NS_qCKUwQl1gy_OrLE0m4A.png" /></figure><p>The Tokenized Signature Request is embedded in this <a href="https://whatsonchain.com/tx/f2b3e75dbe80482e4a36303f898f690b0ef0291e6b96e7d159079ee0cce98eb4">transaction</a>. It decodes to this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/16b530747d7a8ebb41a17b15a55be255/href">https://medium.com/media/16b530747d7a8ebb41a17b15a55be255/href</a></iframe><p>The MessageCode 1002 means it is a Signature Request (same as between James and Scott above). It decodes to this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8c00676d2f2de9449542283e6d920bc6/href">https://medium.com/media/8c00676d2f2de9449542283e6d920bc6/href</a></iframe><p>The payload is a Settlement transaction that is only missing the currency smart contract signatures to be valid. Again skipping this for brevity.</p><h4>Currency Smart Contract Agent Receives Signature Request</h4><p>The smart contract agent for the pound sterling tokens receives the signature request on-chain and responds.</p><ol><li>Unwrap settlement transaction from signature request transaction payload.</li><li>Sign inputs belonging to the currency smart contract agent.</li><li>Broadcast settlement on-chain.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v10j7WnNfvV3IzoctnWprA.png" /></figure><p>This is the completed Tokenized Settlement <a href="https://whatsonchain.com/tx/a629f98ea5291f7d082f92ca50ab04c93bb51cead5b19471e4d04aa04a1a1c53">transaction</a>. It provides the new token balances of each Bitcoin address involved in the transfer. It decodes to this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cd192d0a670d0da3e135dfa528b9d05c/href">https://medium.com/media/cd192d0a670d0da3e135dfa528b9d05c/href</a></iframe><h4>Users Receive Settlements to their Transfers</h4><p>The users see their transfers have been accepted and settled on-chain by the required smart contract agents. It is atomic because it is only valid if both smart contract agents sign. Either smart contract agent can reject and invalidate the request.</p><h3>Conclusion</h3><p>We hope you found this article interesting and informative, and we’d love to strike up a conversation and help you learn more about our project.</p><p>If you’d like to learn more about the Tokenized Protocol, or the company, you can find a wealth of information on our website found here:</p><p><a href="https://tokenized.com/">Tokenized</a></p><p>You can also reach the team in one of our social channels found below:</p><p>Twitter: <a href="https://twitter.com/Tokenized_com">https://twitter.com/Tokenized_com</a></p><p>Our Forum: <a href="https://forum.tokenized.com/">https://forum.tokenized.com/</a></p><p>Telegram: <a href="https://t.me/joinchat/GTCTKhDcyW4-QepyjqiLdQ">https://t.me/joinchat/GTCTKhDcyW4-QepyjqiLdQ</a></p><p>Tokenized Protocol Docs: <a href="https://tokenized.com/docs/intro/preface">https://tokenized.com/docs/intro/preface</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ce07884e2d7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tokenized-blog/tokenized-demo-technical-details-coingeek-ny-2020-4ce07884e2d7">Tokenized Demo Technical Details (CoinGeek NY 2020)</a> was originally published in <a href="https://medium.com/tokenized-blog">Tokenized Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>