<?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 sergi canal on Medium]]></title>
        <description><![CDATA[Stories by sergi canal on Medium]]></description>
        <link>https://medium.com/@shierve?source=rss-f95b24e94fba------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*exqUFrr93PbtovfKp3VUwg.jpeg</url>
            <title>Stories by sergi canal on Medium</title>
            <link>https://medium.com/@shierve?source=rss-f95b24e94fba------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 06:41:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shierve/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[nem-trezor library announcement.]]></title>
            <link>https://medium.com/@shierve/nem-trezor-library-announcement-19801eeb2029?source=rss-f95b24e94fba------2</link>
            <guid isPermaLink="false">https://medium.com/p/19801eeb2029</guid>
            <category><![CDATA[nem]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[trezor]]></category>
            <dc:creator><![CDATA[sergi canal]]></dc:creator>
            <pubDate>Wed, 13 Jun 2018 07:10:17 GMT</pubDate>
            <atom:updated>2018-06-13T07:10:17.699Z</atom:updated>
            <content:encoded><![CDATA[<h4>The new library allows developers to implement Trezor in any NEM solution.</h4><p>Hi nembers!</p><p>I have been working this last month on a library that I think will be useful for developers from now on. Its objective is to help any developer interact easily with trezor and to allow trezor accounts to be used as seamlessly as possible with nem-library.</p><h4>The problem</h4><p>Last month I purchased a trezor device, and I fell in love with it, so I decided to move all my cryptos on there. As the developer of the voting system I was a little disappointed that voting was disabled in NanoWallet when logged in with a trezor account. Of course you can still vote by sending manually a 0xem transaction to the option address, but that is not as cool.</p><h4>The solution</h4><p>When I decided to solve this I did not want to just solve it for my particular problem in NanoWallet. If I was going to go through the trouble of figuring out how trezor works and how it is implemented in nem, I wanted to make it easier for future developers so they would not have to do that, and make sure they can easily use trezor in their projects without the specific knowledge of how trezor works.</p><p>So I created an npm module called nem-trezor which can easily be integrated into any typescript / node project that uses nem-library.</p><p>library source code <a href="https://github.com/shierve/nem-trezor">here</a></p><p>library npm package <a href="https://www.npmjs.com/package/nem-trezor">here</a></p><p>You can find usage examples in the github repository.</p><p>I have also implemented it into NanoWallet so that anybody will be able to use the voting module with trezor in the next version, and I have talked with microWallet’s developers to help them implement trezor in their next version as well.</p><p>If you have any doubts or need any help please reach out to me here, or on telegram (@shierve).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19801eeb2029" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[what we can learn about the NEM voting system from the Travel by bit proposal]]></title>
            <link>https://medium.com/@shierve/what-we-can-learn-about-the-nem-voting-system-from-the-travel-by-bit-proposal-e160d535d0da?source=rss-f95b24e94fba------2</link>
            <guid isPermaLink="false">https://medium.com/p/e160d535d0da</guid>
            <category><![CDATA[voting]]></category>
            <category><![CDATA[nem-blockchain]]></category>
            <category><![CDATA[liquid-democracy]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[nem]]></category>
            <dc:creator><![CDATA[sergi canal]]></dc:creator>
            <pubDate>Thu, 15 Mar 2018 15:33:43 GMT</pubDate>
            <atom:updated>2018-03-15T15:33:43.169Z</atom:updated>
            <content:encoded><![CDATA[<p>First of all, congratulations to the Travel By Bit team, I hope that the project goes well and we have more good news soon.</p><p>The NEM voting module has suffered a little bit in the last months, mainly due to it being disabled for the update of NanoWallet, now it has been reenabled and is regaining popularity amongst nem users, reflected by the number of votes and interest on the last proposal votes. Also, an npm module for voting is being developed and will be released soon so that everyone that wants to include voting in their applications can do so freely and easily, without having to learn about all the technical details.</p><p>So now that the system is back up and doing well, let’s see what we can learn from the most recent proposal, Travel by bit. I have extracted the data from all the votes for the proposal and analysed the data to see what information we can extract from there.</p><p>first of all the total number of votes for the proposal was 464. From those 456 were in favor of the proposal and 8 were against, showing an unanimous support for the project. The total importance of all the voters with valid votes at the time of the end of the poll is 3.1947%, the total importance for the yes vote is 3.1634%, and the importance for no is 0.0312%.</p><p>Of the 464, 123 voters have an importance score of 0, and 299 voters have the minimum of 10000 xem needed to have an importance score. The remaining 42 votes are invalid votes. This are the reasons votes are counted as invalid:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/212/1*pZ7-KmGuLBxs0tTUZT_HUw.png" /><figcaption>Validity of votes</figcaption></figure><p>Votes that send xem to the option account are counted as invalid, to prevent people trying to vote from an exchange to manipulate the results. It is important that when you vote on the NEM system you send a 0xem and 0 mosaics transaction, otherwise your vote will not count. There is also 22 accounts that sent a transaction to both options, and their vote was nullified.</p><p>From the accounts that voted on the proposal 29 are multisig accounts.</p><p>Let’s now draw some charts. First we will plot the total amount of accumulated votes over time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UR-o0Nq420j9_LHPAYlvBQ.png" /></figure><p>We can see the initial spike at the time that the proposal vote was announced, but after that people kept voting on the proposal mostly at a constant rate. We can also see how people at some point lost some interest. As we can see in the next graph that point was when the total importance for the yes option surpassed the 3% importance needed for the proposal to pass. If you support the project it is adviced that you vote even if the importance at the time is higher that 3%, since importances can change, and things can happen over time, so you never know when your vote will be useful.</p><p>Next we will plot the same concept, but instead of total number of voted we will see the total accumulated importance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zZBvKiOIrz5nlTwlNzHNhA.png" /></figure><p>We can see in this plot the sudden spikes from when big importance accounts vote. We can see better here how the number of votes diminishes drastically once the goal is reached. Let’s see now how importances are distributed between voters:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i9CnBe5P7uGT_jN5KLUPpg.png" /></figure><p>This graph contains all the accounts that voted on the poll, we can see that there are a lot of low importance accounts, but also there is one account that can’t be easily seen but is at the right of the poll, and has around 0.14% of the total NEM importance. That is huge. Let’s visualize the same plot but without the 0 importance accounts and the huge account (we will analyse the high importance accounts later).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s927KH9MSZTloQy63vG5wQ.png" /></figure><p>This one looks much clearer after removing the outliers. The distribution is still very left skewed, but there is also an interesting spike at around 0.03–0.35%. I suspect these are supernodes since that is around the importance that you would get by purchasing one.</p><p>Another interesting thing we can do is to visualize the 5 highest importance votes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*tUhPsxDvsXP0krVpJZULBQ.png" /><figcaption>Address, block, validity, multisig, option and importance</figcaption></figure><p>We can see here that the huge account has almost triple the importance than the second vote with more importance, and also that the third highest importance vote is invalid by sending xem or mosaics in the vote transaction. Maybe that is somebody that tried to vote from an exchange?</p><p>In conclusion I think that the results look good for the NEM voting system, and also for Travel By Bit who got very good results. The amount of people that participated on the poll says a lot, and I personally think it will continue to grow.</p><p>It is also important when anouncing a poll to give clear instructions on how to vote, to avoid people from sending invalid votes. Votes from 0 importance accounts are ok and there is nothing wrong with them, since it doesn’t add to the importance score for the option they vote, but it shows support for the project, but it should be made clear that only votes with 0xem and no mosaics are counted as valid.</p><p>If you want to know more about the voting system I have recently redacted a <a href="https://github.com/shierve/NEM-voting-specifications">Technical specification,</a> and stay tuned for the upcoming npm module that will change how voting is used in the NEM ecosystem, increasing the possible use cases. It will also allow extracting data so that anybody can analyse data like in this post.</p><p>I have released the .csv file with the data used and the <a href="https://github.com/shierve/travelbybit">Jupyter notebook</a> used to perform the analysis on github if you want to play with the code, the data or the interactive charts.</p><p>Thanks to all the people who participated to help grow the voting system, and all those who voted.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e160d535d0da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Releasing the NEM Voting Module]]></title>
            <link>https://medium.com/@shierve/releasing-the-nem-voting-module-28c28597d790?source=rss-f95b24e94fba------2</link>
            <guid isPermaLink="false">https://medium.com/p/28c28597d790</guid>
            <category><![CDATA[voting]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[democracy]]></category>
            <category><![CDATA[nem]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[sergi canal]]></dc:creator>
            <pubDate>Sat, 01 Jul 2017 12:19:48 GMT</pubDate>
            <atom:updated>2017-07-25T20:59:33.077Z</atom:updated>
            <content:encoded><![CDATA[<h4>Thanks to the NEM Voting Module anyone can create and participate in polls using Blockchain technology.</h4><p>The <strong>NEM voting platform</strong> is a new <a href="https://github.com/NemProject/NanoWallet/"><strong>NanoWallet</strong></a><strong> module</strong> that allows anybody to create and vote on polls stored on the <strong>NEM blockchain</strong>. The vote counting is made by the client with <strong>open source code</strong>, so that it is completely transparent. All the information is publicly available to everybody.</p><p><strong>NEM </strong>is ideal for a voting system due to the <strong>importance</strong> score inherent to every account on the network, which provides a very interesting way to weight votes.</p><h3>How to use the NEM Voting Module</h3><p>You will find two options on the services tab on NanoWallet: <strong>See Polls</strong> and <strong>Create Poll</strong>. Let’s walk through their features.</p><h4>Creating a Poll</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5ehVC2Lx2tsVEglO-4kGfg.png" /><figcaption>Example of a poll creation form on the testnet</figcaption></figure><p>On the <strong>Create poll</strong> Option you will find a form with all the information needed for a poll to be created. There is a small description for each field.</p><p>The fields that define a <strong>Poll</strong> are:</p><ul><li><strong>Title</strong>: Short Title people will see on the poll Index and when opening the poll.</li><li><strong>Description</strong>: The description’s purpose is to explain what the poll is about and to include relevant information. The description field is not required but it is <strong>strongly encouraged</strong> to include one, so people know exactly what they are voting on.</li><li><strong>Poll Index</strong>: The address of the <strong>Index Account</strong> to send the poll. By default a public one is set.</li><li><strong>Date of ending</strong>: The date and time the poll will end and no more votes will be counted.</li><li><strong>Multiple</strong>: you can choose if the vote will be <strong>multiple option</strong>. In this case vote <strong>weights will be split</strong> between the different options a voter chooses.</li><li><strong>Type</strong>: The type of vote counting (details below).</li><li><strong>Options</strong>: The options voters will be able to choose from.</li><li><strong>Whitelist</strong>: Only used for white list polls, where only votes from the given addresses will be accepted.</li></ul><p>When creating a poll the user can specify the way votes will be weighted. On the current version two options are offered:</p><ul><li><strong>POI</strong>: Proof of Importance is a great tool for weighing the votes on polls, specially those that affect the <strong>NEM community</strong>. In the voting platform we make it possible to use the importance score, intrinsic to <strong>NEM</strong>, to weigh votes in a simple way.</li><li><strong>White List</strong>: On simple polls every vote counts the same. A <strong>whitelist</strong> is required for this polls since anybody can create as many <strong>NEM</strong> accounts as they want.</li></ul><p><strong>Voting and Viewing results</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*MOQytjsc4jLbSElcUVxPWg.png" /><figcaption>Polls list</figcaption></figure><p>On the <strong>See Polls</strong> option you can observe a list of all the polls submitted to the current poll Index, Which at the start will be the default Index. If you click on any of the polls the details of the poll will be <strong>loaded from the blockchain</strong> and displayed. On the bottom there is a button for refreshing the polls on the index.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*cKHybiTHhN9MsXcq3Sz4Gg.png" /><figcaption>voting on a poll</figcaption></figure><p>If everything is correct (you have <strong>voting permissions</strong> and you have <strong>not previously voted</strong>) you can send your vote.<br>If you are cosignatory of a <strong>multisig</strong> account, you will see a <strong>multisig </strong>tab, where you can choose from all your multisig accounts and cast a vote for them, which will appear as a multisig transaction to all the cosignatories.</p><p>On the <strong>options tab</strong> you can find a bar where you can input a<strong> NEM address</strong> pertaining to a poll or a poll Index to display them. You can also <strong>create a new poll Index</strong> and see a list of your created poll indexes if you have any.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*hkhMxDG-Y0FPPLuIg-v5-Q.png" /><figcaption>Results of a poll in the testnet</figcaption></figure><p>You can <strong>display the results</strong> of the poll by going into the <strong>results tab</strong>. If the poll is <strong>ongoing</strong> the results are not definitive since they are checked on the current block, and importance scores are likely to change.</p><p>If the poll has ended the results are definitive and are counted from <strong>historical data</strong>. The counting automatically pulls data from a node that has Historical data activated.</p><h3>Technical Details</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/621/1*kQh38bgPVUgQ1XUeZwpcMg.png" /><figcaption>Account Structure of The module. Colored arrows are messages.</figcaption></figure><p>There are 4 <strong>main concepts</strong> on the data structure of the module:</p><ul><li><strong>Poll Index Account</strong> (PI)</li><li><strong>Poll Account</strong> (PA)</li><li><strong>Option Account</strong> (OA)</li><li><strong>Voter Account</strong> (V)</li></ul><p>When a poll is created the first thing that happens is the creation of a Poll Account. Then the creator sends all the poll information to the <strong>Poll Account</strong> as <strong>messages</strong> in <strong>NEM transactions</strong>. This information includes things like the Title, the type, the description, etc.</p><p>Next, an <strong>Option Account</strong> is created for each of the options the poll has. A message is then sent to the <strong>Poll account</strong> containing the addresses of all the <strong>Option Accounts</strong>, together with their description.</p><p>If the previous steps have succeeded, now the poll is correctly formed and can be already voted on, but first we will add it to a <strong>Poll Index</strong>. This is done by sending the <strong>Index Account</strong> some information abut the poll, but not all, so that it can be loaded faster. We call this the <strong>poll header</strong>, and it contains the address of the <strong>Poll Account</strong>, the title, the type, etc.</p><p>Now, after waiting for the message confirmations, the poll Is correctly formed and can be displayed and found on the <strong>poll Index</strong>. You can now <strong>Vote</strong> on it.</p><p>Votes are sent as an <strong>empty NEM transaction </strong>to the chosen option account. The transaction doesn’t send any <strong>xem</strong> or message, the cost of a vote is simply the fee (1 xem for <strong>normal votes</strong>, 7 xem for <strong>multisig votes</strong>).</p><p>Anybody can create a new <strong>Poll Index</strong>. When creating a <strong>Poll Index</strong> a new <strong>NEM</strong> account is created, and two messages are sent by the creator. The first message is to the poll Index, declaring it as such and sending information to it. Poll Index information says if it is a <strong>private index</strong>, and if it is, then it has the address of the creator. The second message is sent to the creator account from itself containing the Index’s address, so that a user can find all the polls created by him/herself looking at the self-sent messages.</p><p><strong>Private Indexes</strong> can be created, where only the creator of the index Account can submit polls, and when seeing the poll list from such an index, all polls not created by the Index owner will be <strong>ignored</strong>.</p><p>While the voting is still <strong>ongoing</strong> a <strong>temporary result</strong> is calculated pulling data from the current block in the blockchain. Once the poll ends the result is calculated from <strong>historical blockchain data</strong>.</p><h3>Additional Comments</h3><p>We want to implement another type of vote counting in the future which will use <strong>mosaics</strong> to weight the votes. This would introduce very interesting ways to create votes, for example if you have a company and you want to have an internal vote you can create a mosaic and distribute it. You could even send more mosaics to more important figures on the company. You could also have <strong>POS</strong> counting by using <strong>xem</strong> as the mosaic.</p><p>We have this functionality working with ongoing polls, so that you can weigh the votes on the current moment. But since historical data for mosaics is not yet accessible by the<strong> NEM API</strong>, we decided against including it on the first version, since we can’t have past voting and you wold have to trust a result saved in the past instead of calculating it from the blockchain.</p><p>We prefer to wait until we can make it fully <strong>trust-less</strong> and <strong>decentralized</strong>.</p><p><strong>Special thanks</strong> to the whole Atraura team for helping with the development of the project, specially Albert Castellana who got me into NEM and guided me on my first steps on this promising technology. Also Jeff McDonald who provided me with feedback and encouragement. I would also like to thank all the testers who found bugs and provided feedback, like Rin Mizunashi and Quantum Mechanics. This would have not been possible without them.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=28c28597d790" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>