<?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 Zulu Crypto on Medium]]></title>
        <description><![CDATA[Stories by Zulu Crypto on Medium]]></description>
        <link>https://medium.com/@zulucrypto_23845?source=rss-189052efd98c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1NFHQ-rkS0QoKIzfivsA9w.png</url>
            <title>Stories by Zulu Crypto on Medium</title>
            <link>https://medium.com/@zulucrypto_23845?source=rss-189052efd98c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 12:53:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zulucrypto_23845/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[Distributed Trustless Workers with Stellar]]></title>
            <link>https://medium.com/lumenauts/distributed-trustless-workers-with-stellar-e197fd1b77f6?source=rss-189052efd98c------2</link>
            <guid isPermaLink="false">https://medium.com/p/e197fd1b77f6</guid>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[stellar]]></category>
            <dc:creator><![CDATA[Zulu Crypto]]></dc:creator>
            <pubDate>Tue, 06 Feb 2018 01:11:22 GMT</pubDate>
            <atom:updated>2018-04-19T13:37:11.927Z</atom:updated>
            <content:encoded><![CDATA[<p>This article describes something you can do with cryptocurrency besides speculating on the price: pay a distributed network of untrusted workers to create something for you.</p><p>Read on for an in-depth look at how <a href="https://stellar.org/">Stellar</a>’s advanced features can be used to create a “smart contract” between a customer and an anonymous and untrusted worker.</p><h3>Finding something to create</h3><p>Bitcoin and Stellar are both built around the concept of an “address” that is used to send payments. An example Stellar address is: GABFWOKKMDRIDRTUBI6M5SNMABX6XGRPYBYMJ24IIFCDYYZRCKTSKCXZ</p><p>Since that series of random letters and numbers isn’t very user friendly, it’s nicer to have a recognizable address that starts or ends with an english word. For example, if the last four letters were ZULU then it would be much easier to recognize this address and verify a payment was going to the right place.</p><p>Custom addresses like this are known as “vanity addresses” and need to be generated by randomly creating addresses until one is found. Generating a series of four characters would go quickly, but generating ZULUCRYPTO would take much longer. This is a perfect problem for a distributed group of workers!</p><h3>Process Overview</h3><p>There are two actors involved in this transaction:</p><ul><li>The Customer who wants a vanity address generated. I’ll abbreviate their Stellar account as GCUSTOMER (Stellar addresses always start with G). They start with 500 XLM and want to pay 100 XLM for a vanity address.</li><li>The Worker who generates the vanity address: GWORKER. The Worker is willing to accept 100 XLM to generate a vanity address.</li></ul><p>I’ll refer to the vanity address that gets generated as GVANITY.</p><p>Here’s how things look at the beginning:</p><pre>Account: GCUSTOMER<br>Balance: 500 XLM</pre><pre>Account: GWORKER<br>Balance: 1600 XLM</pre><h3>Customer Advertises their Request</h3><p>In order to get work started, the Customer has to solve a few problems:</p><ol><li>How to advertise to the network that there is work to be done?</li><li>How to prove to a Worker that the worker will get paid?</li></ol><h4>Advertising the request</h4><p>First, the Customer has to figure out a way to advertise what vanity keypair they want. This is done by setting a <a href="https://www.stellar.org/developers/guides/concepts/ledger.html#data-entry">Data Entry</a> on an account. Each data entry is a key/value pair, so as long as the Customer and Worker can agree on a standard, this is a way to broadcast something to the entire network.</p><p>In this case, we’ll set the key request:generateVanityAddress to value G*ZULU . Now, the Worker can scan the blockchain for any accounts with the request:generateVanityAddress data and then examine the value to see what vanity address is requested. In this case, it’s anything that starts with “G” and ends in “ZULU”.</p><h4>Proving that a Worker will get paid</h4><p>This can be solved through the use of an Escrow account (that the Customer creates) which we’ll refer to as GESCROW. In order for an escrow account to be effective, the Worker needs to know that the Customer has the funds available to pay them and that the Worker will be able to access those funds when the vanity address has been generated.</p><p>The Customer also needs some way to reclaim their funds if a Worker never completes their task.</p><p>We’ll go in reverse and come up with a way for the Customer to retrieve their funds by creating a pre-authorized transaction that’s not valid until 30 days have passed:</p><pre>Transaction Name: txReclaimAccount<br>    Submitted By: GESCROW<br>      Timebounds: Valid starting 30 days from now</pre><pre>Operations:<br>  1. Merge GESCROW into GCUSTOMER</pre><p><strong>Timebounds</strong> are a Stellar feature that allows you to create a transaction that’s only valid during a specific time range. For more details on transactions, see: <a href="https://www.stellar.org/developers/guides/concepts/transactions.html">https://www.stellar.org/developers/guides/concepts/transactions.html</a></p><p>The <strong>Merge</strong> operation destroys an account and sends all funds to a destination account. The operation above will destroy GESCROW freeing up its resources and sending the balance back to GCUSTOMER.</p><p>The customer now saves this transaction somewhere and can submit it to the network after 30 days have passed.</p><p>Now it’s time to prove to the Worker that the Customer no longer has access to the escrow account for these 30 days. To solve this problem, we use Stellar’s <a href="https://www.stellar.org/developers/guides/concepts/multi-sig.html">multisignature features</a>.</p><p>As the Customer, we immediately submit this transaction to the network:</p><pre>Transaction Name: txShareAccount<br>    Submitted By: GESCROW</pre><pre>Operations:<br>  1. Add GWORKER as a signer with weight 1<br>  2. Add GCUSTOMER as a signer with weight 1<br>  3. Require a weight of 2 to perform any actions on the account<br>  4. Set the weight of the master key (GESCROW) to 0</pre><p>After this transaction is submitted, a weight of 2 is required to do anything with this account. Since the GESCROW master key now has a weight of 0, the only way for anything to happen is if GCUSTOMER and GWORKER agree on a transaction and both sign it.</p><p>The one exception to this is the pre-authorized txReclaimAccount transaction, but since it’s not valid for 30 days, the Worker is guaranteed 30 days to work on generating the vanity address.</p><p>At this point, we have the following accounts:</p><pre>Account: GCUSTOMER<br>Balance: 400 XLM (100 transferred to GESCROW)</pre><pre>Account: GWORKER<br>Balance: 1600 XLM</pre><pre>Account: GESCROW<br>Balance: 100 XLM (100 from GCUSTOMER)<br>Signers:<br>  1. GCUSTOMER (weight 1)<br>  2. GWORKER (weight 1)<br>  3. Master key can no longer sign<br>  4. Pre-authorized transaction (valid starting 30 days from now)</pre><p>To keep things organized, GESCROW is also the account that the request:generateVanityAddress data entry mentioned above is attached to.</p><h3>Worker begins work</h3><p>We’ll switch over to the Worker’s perspective now. By scanning the blockchain, we’ve discovered that someone has requested an address that ends in “ZULU”.</p><p>Since this request is attached to the Escrow account, we can see that the price is reasonable (100 XLM) and that the escrow account is locked and cannot be reclaimed by the Customer while we’re working on it.</p><p>The actual algorithm for generating a vanity address involves repeatedly generating random keys until we find one that matches the Customer’s desired pattern.</p><p>At some point, we’ll find a matching address and then we have to begin the process of communicating it to the Customer.</p><h3>Worker proves that they found a keypair</h3><p>After finding a keypair, the Worker’s challenge is to prove to the Customer that they’ve generated it. There also needs to be a way for the Customer to pay the Worker by transferring the escrow account.</p><p>This process will again rely on account data entries. In this case, they will be attached to the Worker account.</p><p>First: set a data entry with key:value GCUSTOMER_result:GVANITY . This allows the Customer to examine the data entries on GWORKER to check if the Worker is done.</p><p>Then, we need a way to prove to the Customer that the Worker controls the private key for GVANITY without revealing what that private key is. This process should sound familiar since that’s how cryptocurrencies work! When you’re submitting a transaction to the network you’re using your secret key to sign a transaction. In this case, we’ll sign a text string and write the signature to our account as the following key:value pair: GCUSTOMER_proof:&lt;ed25519 signature&gt;. The text being signed doesn’t matter as long as GCUSTOMER and GWORKER both know what it is.</p><p>The final thing the Worker needs to take care of is generating signatures for the transfer transaction.</p><h3>The transfer transaction</h3><p>This transaction is the critical part of the process and allows the Customer and Worker to exchange payment and data in a single operation. Due to the properties of the Stellar Consensus Protocol, all operations in a transaction will either succeed or fail. There’s no way for the transaction to be partially completed.</p><p>This transaction will look like the following:</p><pre>Transaction Name: txTransfer<br>    Submitted By: GCUSTOMER (see the next step)<br>  Source Account: GCUSTOMER</pre><pre>Operations:<br>  1. GVANITY: Add GCUSTOMER as a signer with weight 1<br>  2. GVANITY: Set all thresholds to 1<br>  3. GVANITY: Set master key weight to 0<br>  4. GESCROW: Merge to GWORKER</pre><p>The first three operations take care of giving control of GVANITY to GCUSTOMER. After the above transaction runs, the secret key to GVANITY (only known by GWORKER) will no longer be able to perform any operations on the account since its weight will be 0 and all operations have a threshold of 1.</p><p>The last operation is how GWORKER receives payment: GESCROW is merged to GWORKER which transfers all XLM in the account.</p><p>Since this transaction involves three accounts (GCUSTOMER, GVANITY, and GESCROW) it will require three signatures:</p><ul><li>GWORKER to provide 1 of 2 necessary weights to mergeGESCROW</li><li>GCUSTOMER since they are the source account (which means they are paying all fees) and are 1 of 2 necessary weights to merge GESCROW</li><li>GVANITY because we’re altering the thresholds and master key weights of GVANITY</li></ul><p>Since the Worker knows the private keys for GWORKER and GVANITY it can provide these signatures and write them as data entries on the GWORKER account.</p><p>Note that the Worker is not submitting the above transaction! They only generate the signatures for it. It will be the Customer’s responsibility to provide the final signature and submit to the network.</p><h3>Customer verifies vanity keypair and submits transfer transaction</h3><p>The Customer checks the data entries on GWORKER and sees the following:</p><pre>     Account: GWORKER<br>Data Entries:<br>  GCUSTOMER_result: GVANITY<br>  GCUSTOMER_proof: &lt;ed25519 signature&gt;<br>  GCUSTOMER_sigW: &lt;worker stellar signature for txTransfer&gt;<br>  GCUSTOMER_sigV: &lt;vanity keypair stellar signature for txTransfer&gt;</pre><p>The Customer now takes the following steps:</p><ol><li>Verify that the data in GCUSTOMER_proof is a valid signature. This is how we know that GVANITY was really generated.</li><li>Build txTransfer . The Customer and Worker both independently build this transaction. All that needs to be exchanged are the signatures.</li><li>Add a signature from GCUSTOMER to txTransfer</li><li>Add the _sigW and _sigV signatures that were read from the GWORKER data entries</li><li>Submit txTransfer to the Stellar network now that the Customer has all of the necessary signatures</li></ol><p>As soon as txTransfer is submitted and confirmed then the process is complete!</p><h3>Customer uses vanity address</h3><p>The Customer is now in control of the vanity address, but you’ll note they never received the secret key.</p><p>Instead, Stellar’s multisig features are used to allow GCUSTOMER to sign for GVANITY.</p><p>For example, to pay 50 XLM toGMERCHANT, the following transaction would be generated:</p><pre>Transaction Name: txExamplePayment<br>    Submitted By: GCUSTOMER</pre><pre>Operations:<br>  1. From GVANITY: Pay 50 XLM to GMERCHANT</pre><p>GCUSTOMER would then sign this transaction with their own secret key. Even though the payment is coming from GVANITY, GCUSTOMER can provide a weight of 1 with their signature which is enough to perform any operation.</p><h3>Real-world Implementation</h3><p>A working implementation of this would require that Customers and Workers agreed on some standards. It would also require additional data entries for better communication between the two parties.</p><p>Source code implementing a test version of this smart contract is available at: <a href="https://github.com/zulucrypto/stellar-smart-contracts/blob/master/distributed-worker/README.md">https://github.com/zulucrypto/stellar-smart-contracts/blob/master/distributed-worker/README.md</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e197fd1b77f6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/lumenauts/distributed-trustless-workers-with-stellar-e197fd1b77f6">Distributed Trustless Workers with Stellar</a> was originally published in <a href="https://medium.com/lumenauts">Lumenauts</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Crypto Quickstart: Mobius with PHP]]></title>
            <link>https://medium.com/mobius-network/crypto-quickstart-mobius-with-php-bbb1fe8269a0?source=rss-189052efd98c------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbb1fe8269a0</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[mobius]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[tutorial]]></category>
            <dc:creator><![CDATA[Zulu Crypto]]></dc:creator>
            <pubDate>Tue, 14 Nov 2017 23:58:16 GMT</pubDate>
            <atom:updated>2017-11-15T17:31:04.573Z</atom:updated>
            <content:encoded><![CDATA[<p>For the first article in this series, I’m going to focus on a promising new token with one of the easiest APIs I’ve ever seen. To help you get started faster, I’ve created a template project that you can use to get going with one command!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5pfX7Rd0A3AcgLONIrLVOQ.png" /><figcaption>Mobius uses tokens called MOBI to power their platform</figcaption></figure><p>The template project is a (very unfair) coin flipping game. If the player guesses right, they’ll get to keep their tokens. If they guess wrong, they lose a token!</p><p>Prerequisites:</p><ul><li>Basic knowledge of PHP and the Symfony framework (or other MVC web frameworks)</li><li>PHP installed with SQLite support</li><li>A working <a href="https://getcomposer.org/doc/00-intro.md">composer</a> installation</li></ul><p>At the end of this quickstart you’ll have:</p><ul><li>A Mobius developer account</li><li>A working application that you can hook up to the DApp store</li></ul><h3>Optional: Register for a Mobius developer account</h3><p>Skip to “Registering a DApp” if you already have a Mobius developer account.</p><p>Start the signup process by going to <a href="https://mobius.network/store/signup">https://mobius.network/store/signup</a></p><p>Once you’ve signed up, go to the next section.</p><h3>Registering a DApp</h3><p>Start on the DApp store developer page: <a href="https://mobius.network/store/developer">https://mobius.network/store/developer</a></p><p>At the top, you’ll see your <strong>API Key</strong>. Keep track of this for later!</p><p>Fill out the form to add a new DApp:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wr0ol2dRlT96yOU7jKrOJg.png" /></figure><p>Then, click “Submit”. Your new DApp will appear at the bottom of the page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*q619kjkv8xXTDGPj4L05iA.png" /><figcaption>New app before depositing credits</figcaption></figure><p>Make a note of the App <strong>UID</strong> (scrambled in the image above).</p><p>The next step is to deposit some credits. Enter “100” in the “# Credits” field and click “Deposit”.</p><p>If this is a new account, you’ll need to confirm your email address. Once you’ve done that, deposit the credits again.</p><p>After you’ve made a deposit, verify that it is listed next to “Credits” and continue to the next section.</p><h3>Installing the Quickstart</h3><p>Install the template project with composer:</p><pre>$ composer create-project zulucrypto/mobius-dapp-quickstart</pre><p>As part of the install process, you’ll be prompted for some values. Fill in your API key and App UID:</p><pre>...<br>Creating the &quot;app/config/parameters.yml&quot; file<br>Some parameters are missing. Please provide them.<br>secret (ThisTokenIsNotSoSecretChangeIt):<br>mobius_app_uid (null): &lt;YOUR APP UID HERE&gt;<br>mobius_api_key (null): &lt;YOUR API KEY HERE&gt;</pre><p>Composer will finish the installation and generate an empty database.</p><p>Now, start the web server:</p><pre>$ cd mobius-dapp-quickstart<br>$ bin/console server:run</pre><pre>[OK] Server listening on http://127.0.0.1:8000</pre><pre>// Quit the server with CONTROL-C.</pre><pre>PHP 7.1.9 Development Server started at Tue Nov 14 13:57:24 2017<br>Listening on http://127.0.0.1:8000<br>Document root is /var/www/html/mobius-dapp-quickstart/web<br>Press Ctrl-C to quit.</pre><p>Then, load up the web page and you should see the introduction page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*adNRRLsz97YA4MSWatqYgQ.png" /></figure><p>Enter the email address you used when signing up for the DApp store and click “Simulate Login” button. You’ll then be taken to the screen where you can play the game by choosing “heads” or “tails”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/670/1*mim14J4QyT0x7sCVxZ5dyA.png" /></figure><p>Congratulations, you’ve got your first DApp!</p><h3>Code Walkthrough</h3><p>Most of the hard work is done by Mobius and the Mobius SDK. When developing a DApp, you’ll need to know a few things:</p><p><strong>Helper Services</strong><br>The Mobius app store API is available as the mobius.app_store service. For example, you can access it in a controller via $this-&gt;get(&#39;mobius.app_store&#39;)-&gt;getBalance(&#39;user@example.com&#39;)</p><p><strong>User Deposits<br></strong>When a user makes a deposit, you can be notified by a webhook. In this quickstart it’s implemented as MobiusWebhookController and will automatically create new users or update the balance of existing ones.</p><p>During development you can use the mobius:simulator:app-store-deposit command to simulate a user making a deposit.</p><p><strong>Using Tokens</strong><br>To transfer tokens from the balance the user deposited to your app, call useBalance:</p><p>$this-&gt;get(&#39;mobius.app_store&#39;)-&gt;useBalance(&#39;user@example.com&#39;, 5)</p><p>If the user doesn’t have enough credit, this will throw an exception.</p><h3>Next Steps</h3><ul><li><a href="https://t.me/mobius_network">Join other developers in the Mobius Telegram</a> or <a href="https://mobius.rocket.chat/">Rocket Chat</a> and share what you’re building!</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbb1fe8269a0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/mobius-network/crypto-quickstart-mobius-with-php-bbb1fe8269a0">Crypto Quickstart: Mobius with PHP</a> was originally published in <a href="https://medium.com/mobius-network">Mobius Network</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>