<?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 X20 Network on Medium]]></title>
        <description><![CDATA[Stories by X20 Network on Medium]]></description>
        <link>https://medium.com/@X20Network?source=rss-e53d29cfe8bf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wIQRuAASiNqvvLYlwufdCg.png</url>
            <title>Stories by X20 Network on Medium</title>
            <link>https://medium.com/@X20Network?source=rss-e53d29cfe8bf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 09:25:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@X20Network/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[The Investment Story for the X20 Smart Wallet]]></title>
            <link>https://medium.com/@X20Network/the-investment-story-for-the-x20-smart-wallet-90d44e1ee6da?source=rss-e53d29cfe8bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/90d44e1ee6da</guid>
            <category><![CDATA[defi]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[wallet]]></category>
            <category><![CDATA[x20]]></category>
            <dc:creator><![CDATA[X20 Network]]></dc:creator>
            <pubDate>Wed, 10 Jun 2020 10:25:37 GMT</pubDate>
            <atom:updated>2020-06-10T10:25:37.538Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OQIIN5ze8JOLsYasWA9UpQ.png" /></figure><p>Innovation is a defining feature of our modern society. It has transformed the world in which we live and enabled huge improvements in living standards for people across the globe. It’s overall pace has been accelerating, however progress has not been evenly spread. Some sectors have not enjoyed the same level of productive disruption as others. And in fact there has been one standout exception: the financial system.</p><p>In his book “How Innovation Works”, Matt Ridley invites us to view innovation as an incremental bottom-up, fortuitous process that happens to society as a direct result of the human habit of exchange, rather than as an orderly, top-down process developing according to a plan. In other words the best conditions for innovation are ones in which people have the freedom to tinker, experiment, and freely build on top of other peoples’ inventions in an organic manner. Conditions like these are inhibited in the traditional financial system by two things; the need for trust and the tendency for technology to be proprietary.</p><p>These two problems are almost impossible to solve because they are inherent to the system itself. Governments have recently tried to force the issue, creating for example the Open Banking API in Europe, however it is too little too late. As the traditional financial system has stagnated, big technological inventions have emerged that enable the creation of a new parallel system in which these innovation stifling issues are not present.</p><p>Decentralised blockchains with smart contracts solve matters of trust by allowing innovators to write code that puts constraints on value exchange. That code cannot be stopped or manipulated by a third party. They are also necessarily open by design. Thus they are much better incubators of innovation than the traditional financial system. Recently this has been observed in practise as developers adopt the technology and has now been given a name: DeFi — decentralised finance.</p><p>There are many disparate motivations stated by DeFi project teams. Some groups imagine the primary benefit as the creation of a financial system outside of any state control. Some groups have the vision of providing financial services to those sectors of society underserved by banks. Perhaps there is some merit in these goals, however at X20 we believe the main advantage will be the wave of innovation that will take it beyond the current system in terms of functionality and in ways that might not presently be even imaginable.</p><p>In realising it’s full potential, however, DeFi currently has a big problem. For all of the love that developers have for building on the platform, that love is generally not matched by the people who ultimately matter most; the end users. There are several reasons for this. Firstly, the workflow required to enter the system and participate consists of many different actions. Each of these steps involve dealing with different entities and using different user interfaces designed by different people. For example one must use online banking, a fiat to crypto exchange, an altcoin exchange, a cryptocurrency wallet and finally the DeFi projects own interface. Secondly, the management of security and recovery of accounts is entirely left up to the individual. In most cases a brand new user is presented with one of the most difficult choices in all of cryptocurrency at the very first step: how to store your 24 word seed phrase.</p><p>X20 believes there is a better way. Through vertical integration and opinionated design we will overcome the problem of complexity. We will integrate all of the workflow into one mobile application with strong user experience. While we won’t be able to build access to the entirety of the DeFi world, it will be enough for the mainstream 90%. Strong opinions won’t suit the power user, who will favour the flexibility of choosing their own solutions, but as DeFi grows they will account for an ever smaller proportion of users.</p><p>The second problem will be solved using the power of smart contracts. Instead of simple native accounts and instructing the user to backup 24 words however they see fit, we will offer a layered security model and social and assisted recovery methods. We will allow small transactions to happen with the simplest security and maximum convenience and ask for multiple factors like a hardware wallet confirmation for the large transactions. And if the user loses their phone then they will get their nominated trusted friends to help recover their account.</p><p>DeFi is a new era in financial innovation. The opportunities for new players in this space are huge, and we believe the biggest opportunity of all resides in creating the best access point to this technology. Just as having the best operating system, the best internet search, or the best mobile phone have resulted in some of the biggest technology businesses so far, the architect of the best smart wallet will reap immense rewards as we progress into a new financial system.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90d44e1ee6da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developing the X20 Auction Smart Contract]]></title>
            <link>https://medium.com/@X20Network/developing-the-x20-auction-smart-contract-46489fe780f6?source=rss-e53d29cfe8bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/46489fe780f6</guid>
            <category><![CDATA[dapps]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <dc:creator><![CDATA[X20 Network]]></dc:creator>
            <pubDate>Fri, 11 Jan 2019 14:41:08 GMT</pubDate>
            <atom:updated>2019-01-11T15:15:58.439Z</atom:updated>
            <content:encoded><![CDATA[<p>X20 auctions allow users to trade in batches of orders collected over several hours, all settled at the same price to help with liquidity and efficiency. This presents some unique challenges and opportunities for the smart contract development. We have also tried to improve upon the industry standard in terms of user experience and the required blockchain computation costs. In this post we will go through the main challenges and explain some of the technicalities of the smart contract behind X20 auctions.</p><h3>Design Principles</h3><p>We set up some clear goals and priorities for the development. The main principles we followed while developing the X20 auction smart contracts were:</p><p>1. <strong>Security</strong>: Smart contract security is the main priority, as the safety of all users’ funds depends on it.</p><p>2. <strong>Usability</strong>: Using dapps creates an additional hurdle in itself as it requires a wallet, so we wanted to eliminate additional friction and make the auction as user-friendly as possible.</p><p>3. <strong>Efficiency</strong>: The gas cost for some decentralised exchanges far outweighs the actual trading fee, making trading a lot more expensive compared to centralised exchanges. Our auction approach already provides more efficiency because of its batched nature, but we wanted to optimise gas usage even further to make the gas cost negligible compared to trading fees.</p><h3>Auction Structure</h3><p>One of the challenges for development was dealing with the timing requirements of running auctions. Auctions can be active and run for any number of hours, but there is also a set period at the end we call finalisation which is necessary to ensure that the correct price and orders are present.</p><p>To save on the gas cost of computing the optimal price — the price that maximises the trading volume — we implemented only its verification in the smart contract, so that any incentivised party can compute the optimal price themselves and suggest it to the smart contract, and the smart contract will be able to tell which suggestion is correct. This all happens in the Checking period.</p><p>To allow off-chain orders that cost nothing when the order is not filled — including no gas cost for the user — we have added a Reveal period where off-chain orders signed by the user can be submitted by the operator after filtering based on the price and knowing the final price in advance.</p><h3>Security</h3><p>We have tried to keep the smart contract relatively simple to reduce the surface for possible errors. Because of this we have implemented all the components in a <a href="https://etherscan.io/address/0x20a1ffc4262a7a9fc2b29a262f82acec91258b08">single smart contract</a> with only the needed functionality. We have also added safeguards to prevent wrong auction execution even if the operator fails or transactions are spammed.</p><p>Thorough testing is also necessary to reduce the likelihood of errors. As such, we have tested many different setups with a variety of order types and combinations, different token types that do not exactly conform to the ERC-20 standard, server failure that would cause operator-only functions to not be called in time and a range of extra functionalities.</p><p>Having external experts look at the code is vital especially when the users’ funds is at stake and when the code handling them is immutable. We have engaged a third-party to perform a security audit of our smart contract. <a href="https://github.com/X20Network/x20-auction-contract/blob/master/audit/audit-signed.md">The audit</a> found no critical issues and the issues it found have been resolved with the exception of two low severity ones. Those two are conceptual limitations that were known in advance and are part of the auction design, necessary for allowing off-chain orders and efficient price computation.</p><h3>Efficiency</h3><p>Batched transactions are often used to save gas costs for Ether and token transfers. One of the benefits of running auctions with many orders at once is that it can make use of this technique and greatly reduce the gas cost for any single order. It means that a single Ethereum transaction can submit potentially up to 100 orders at once, reducing the overhead of the transaction cost. However, it also allows us to do the order matching in <em>O(n)</em> time where <em>n</em> is the number of orders, by putting only the verification of the correct price on-chain based on the assumption that incentivised parties will submit the correct price suggestion even if the operator did not.</p><p>We have gone through the code very carefully looking at the gas used at every line to eliminate any unnecessary cost. One of the main conclusions is that storage is by far the most expensive operation that we frequently use, and the Solidity compiler makes surprisingly few optimisations to reduce that cost. We therefore decided to <a href="https://github.com/X20Network/x20-auction-contract/blob/master/documents/order-structure.md">store every order in a single uint256 value</a> which includes an id representing the user, the price for the order and the amount. We also added logic to keep storage values in memory if they need to be updated multiples times within the same transaction.</p><p>Another way in which we reduce the gas cost, by essentially arbitraging the gas price at different times, is by using what we call a gas reserve that works in a way very similar to <a href="https://gastoken.io/">GasToken</a>. We can add to the gas reserve by filling up the storage at a time when gas prices are low, and then freeing up that storage and getting a gas refund when finalising the auction if the gas prices are higher. We use all 1s to fill the storage so that it is easily compressible by the client if needed.</p><h3>Usability</h3><p>In order to keep the user experience as smooth as possible, we have decided to support Ether and ERC-20 tokens directly, without requiring any wrappers such as wETH.</p><p>Some tokens do not follow the ERC-20 standard completely and <a href="https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca">have no return value</a> for the transfer, approve and transferFrom functions. This has historically been ignored because of a bug in Solidity that was only fixed in version 0.4.22. Since we are using Solidity 0.4.24 — which has been <a href="https://blog.zeppelin.solutions/solidity-compiler-audit-8cfc0316a420">audited by Zeppelin</a> thanks to the Augur team and the Ethereum Foundation — we cannot ignore this issue. We deal with these tokens specifically by defining noReturnTransfer, noReturnApprove and noReturnTransferFrom flags that help the smart contract select the right interface for the token.</p><p>We have also implemented some additional features in the smart contract — which are not yet accessible through the UI — that will further streamline the experience.</p><p>These features include the depositAndBuy function that allows users to deposit some Ether into the contract and place a buy offer at the same time, so that they only need to confirm one transaction instead of two. The function also allows the smart contract to send the tokens back to the user directly once the auction executes without requiring a separate withdrawal transaction from the user.</p><p>We also support <a href="https://github.com/ethereum/EIPs/issues/677">ERC-677</a> tokens by implementing the receiveApproval function that essentially acts as a depositToken or depositAndSell function by utilising the data part of the transferAndCall function which reduces the number of transactions as well.</p><p>To allow us to potentially distribute new tokens’ airdrops in the future, we have added a claimNeverSupportedToken function that we can use to handle tokens that have never been supported by our smart contract and so could not have been deposited properly.</p><p>Users may have difficulty withdrawing their funds if they ran out of Ether on their Ethereum account and cannot pay for the gas, even if they have Ether or tokens stored in our smart contract. We have implemented a withdrawForUser function that allows the operator to withdraw to a user’s wallet on their behalf — provided they sign a message with their private key — while accepting some Ether or ERC-20 token from the user’s account to pay for the gas cost.</p><p>We have intentionally made it difficult to upgrade the smart contract — to emphasise the immutable aspect of smart contracts for security — but for when we need to release a new version, we have created a migrate function that allows users to transfer all their funds over to the new contract by making only one transaction.</p><p><a href="https://www.x20.auction/">X20 Auction</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46489fe780f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing the X20 Token Auction]]></title>
            <link>https://medium.com/@X20Network/introducing-the-x20-token-auction-6948a5f18e5d?source=rss-e53d29cfe8bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/6948a5f18e5d</guid>
            <category><![CDATA[exchange]]></category>
            <category><![CDATA[auction]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[erc20]]></category>
            <dc:creator><![CDATA[X20 Network]]></dc:creator>
            <pubDate>Fri, 11 Jan 2019 10:54:32 GMT</pubDate>
            <atom:updated>2019-01-11T10:58:29.879Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong><em>The X20 Token Auction is the secure and fair way to trade ERC20 tokens.</em></strong></h4><p>X20 brings together multiple buyers and sellers in a “double auction” that runs at specified times of the day. Inspired by existing financial auctions (for example for stocks on the NYSE), this enables a “one fair market price” to be calculated that maximises the amount of tokens that change hands at any one time. Every market participant that has their order filled gets the same price.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D6fbS8OEgkO8iBGqpwhKNA.png" /><figcaption>A double auction orderbook on X20.</figcaption></figure><p>As well as running auctions for Ethereum based tokens, X20 also runs the core auction logic on the Ethereum blockchain itself as a smart contract. We do this primarily so that we do not have to take direct custody of our users funds. Unlike a centralised exchange, there is no private key (or keys) that hackers can obtain that would enable them to steal tokens. Instead, everything is locked in the smart contract with strong and visible guarantees about what can and can’t occur. The auction logic itself is also transparent and verifiable so that our users can be sure that the price they receive is the correct and fair market price. In addition, when compared to other smart contract powered platforms, an auction (coupled with our aggressive optimisation) makes for very efficient blockchain usage and much lower transaction fees.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yuZ4EamQgAsSNQsIWoFpHA.png" /><figcaption>Creating an order on X20. X20 makes very efficient use of the blockchain resulting in low tx fees.</figcaption></figure><p>X20 was born out of frustrations with existing cryptocurrency exchanges. We were concerned with the security and trust issues of handing over our tokens to a centralised account, and also the difficulty in obtaining a fair price for large orders on traditional continuous exchanges. We believe our solution is a great way of addressing both of these concerns, and indeed security, transparency and fairness will form the core values of all our products that we launch in this space.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9G-61G1jqPB5K0wv7CNgbQ.png" /><figcaption>Introducing X20. The secure and fair way to trade tokens.</figcaption></figure><p><a href="https://x20.auction/">X20 Auction</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6948a5f18e5d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>