<?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 Wika Network on Medium]]></title>
        <description><![CDATA[Stories by Wika Network on Medium]]></description>
        <link>https://medium.com/@wikanetwork?source=rss-b6087578cbf0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Z-W3fI1zObyv1eqHbc4_6A.png</url>
            <title>Stories by Wika Network on Medium</title>
            <link>https://medium.com/@wikanetwork?source=rss-b6087578cbf0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 02:52:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@wikanetwork/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 Wika Network API]]></title>
            <link>https://wikanetwork.medium.com/the-wika-network-api-4309e48a7d4f?source=rss-b6087578cbf0------2</link>
            <guid isPermaLink="false">https://medium.com/p/4309e48a7d4f</guid>
            <dc:creator><![CDATA[Wika Network]]></dc:creator>
            <pubDate>Mon, 18 Apr 2022 17:14:49 GMT</pubDate>
            <atom:updated>2022-04-18T22:20:32.178Z</atom:updated>
            <content:encoded><![CDATA[<p>The easiest way to consume the Wika blockchain data</p><p>Building the foundations of the Wika Network, we have now a test net blockchain up and running, an ETL syncing the data from the blockchain to database instances, and we just delivered a MVP API to consume the data: <a href="https://github.com/randombishop/wika_api">wika_api on github</a>.</p><p>This first version comes with 4 simple endpoints:</p><ul><li>List the Urls liked by a user.</li><li>List the Urls owned by a user.</li><li>Search the Urls database using an Elastic Search query.</li><li>Generate recommendations for a specific user based on their likes, ownerships, network connections, and keywords.</li></ul><p>You can find the Swagger documentation and test front-end at <a href="https://api-test.wika.network/doc/">https://api-test.wika.network/doc/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0AGRVy636yrNNW-mYN2nGg.png" /><figcaption><a href="https://api-test.wika.network/doc/">https://api-test.wika.network/doc/</a></figcaption></figure><h4>How it works</h4><p>The repo is a simple MVP using <a href="https://nestjs.com/">Nest JS framework</a>.</p><p>It relies on 2 data sources: Neo4j and ElasticSearch, with the schemas defined by the <a href="https://github.com/randombishop/wika_etl">Wika ETL repo</a>, responsible for syncing between the blockchain and these databases.</p><p>If you have an instance of Wika ETL up and running, you can plug this API to these databases with a read only connection, you’ll find easy to use instructions in the readme file.</p><p>For development and testing, a little snapshot of the databases is provided in the `test_db` folder, along with a docker file to get them quickly up and running.</p><p>With that, the rest is simple data access functions, defined in service classes, and a main controller class that defines and configures the endpoint.</p><p>It’s pretty cool that by adding annotations to the controller class, the NestJS framework automatically generates the documentation and front-end to test the API.</p><h4>The recommendation engine</h4><p>The recommendation engine generates recommendations for a specific user based on their likes, ownership, network connections, and keywords.</p><p>It performs the following algorithm:<br>1. get connectedUrls using `neo4j.listUrlsByNetwork(user)`: for example, if the user U1 liked a website, and the same website was liked or owned by a another user U2, all Urls connected to U2 are considered connected.<br>The function also orders all connected Urls by total number of likes and returns the top 100<br>2. The connected urls are passed to Elastic Search `More Like This` search method, returning a list of similar documents ordered by matching score.<br>3. Adds the total numbers of likes and the user number of likes to the search results.</p><p>This implementation is not a performant solution, but just a demo to compose a full system end-to-end, start collecting more data, and improve from there.</p><h4>Coming up next</h4><p>Our next step is to use all these components to deploy a cool end-user app and browser extension, stay tuned for the next update…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4309e48a7d4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Wika Network Dataset]]></title>
            <link>https://wikanetwork.medium.com/the-wika-network-dataset-bbb936cb27c3?source=rss-b6087578cbf0------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbb936cb27c3</guid>
            <dc:creator><![CDATA[Wika Network]]></dc:creator>
            <pubDate>Wed, 09 Feb 2022 04:05:39 GMT</pubDate>
            <atom:updated>2022-02-17T11:18:32.753Z</atom:updated>
            <content:encoded><![CDATA[<p>How to sync Wika Blockchain data with indexed databases using Subquery framework.</p><h4>Audience</h4><ul><li>Wika community members who want to use the blockchain data to analyze or build.</li><li>Subquery users who want to learn from an example use case.</li></ul><h3>Overview</h3><p>The Wika Network <a href="https://github.com/randombishop/wika_etl">ETL repo</a> provides an easy way to index the Wika blockchain data into 3 databases:</p><ul><li>As tables: Postgres.</li><li>As a graph: Neo4J.</li><li>As documents: Elastic Search.</li></ul><p>It relies on <a href="https://subquery.network/">Subquery</a> and was developed by starting from its default scaffolding.</p><p>This article will describe how we used Subquery to implement this use case; and describe the databases that you can generate and sync with the blockchain.</p><h3>How we built on top of Subquery</h3><p>Subquery proposes a very intuitive workflow (<a href="https://doc.subquery.network/create/introduction/#">Subquery documentation</a>) to sync blockchain data with a Postgres database:</p><h4>1. Initializing the project</h4><p>Very straightforward after installing the dependencies</p><p>subql init subql_wika</p><h4>2. Updating the manifest file</h4><p>In the file project.yml we set the blockchain endpoint, the genesis hash of our testnet, and the starting block. The mapping section was kept to the defaults but that’s where the magic happens, it basically says that each new block data will be handled by the function handleBlock, events by handleEvents, etc.</p><pre>specVersion: 0.2.0<br>name: subql_wika<br>version: 1.0.0<br>description: &#39;&#39;<br>repository: https://github.com/randombishop/wika_etl<br>schema:<br>  file: ./schema.graphql<br>network:<br>  endpoint: wss://testnode3.wika.network:443<br>  genesisHash: &#39;0x59732b25bb635769e91a71f818c6d845b9bdcd371bb93d1512b1eacedb53d4be&#39;<br>dataSources:<br>  - kind: substrate/Runtime<br>    startBlock: 1777550<br>    mapping:<br>      file: ./dist/index.js<br>      handlers:<br>        - handler: handleBlock<br>          kind: substrate/BlockHandler<br>        - handler: handleEvent<br>          kind: substrate/EventHandler<br>        - handler: handleCall<br>          kind: substrate/CallHandler</pre><h4>3. Defining our dataset</h4><p>This is done in the file schema.graphql, where we defined 4 entities:</p><ul><li>BlockInfo: id and sync date</li><li>UrlMetadata: to store the title, description and some metadata about each webpage.</li><li>LikeEvent and UrlRegisteredEvent: the core of our blockchain data.</li></ul><pre>type BlockInfo @entity {<br><br>  id: ID! #id is a required field<br>  blockNum: Int! @index(unique: true)<br>  syncDate: Date!<br><br>}<br><br><br>type UrlMetadata @entity {<br><br>  id: ID! #id is a required field<br>  title: String<br>  description: String<br>  image: String<br>  icon: String<br>  updatedAt: Date!<br><br>}<br><br><br>type LikeEvent @entity {<br><br>  id: ID! #id is a required field<br>  url: String! @index(unique: false)<br>  user: String! @index(unique: false)<br>  numLikes: Int!<br>  blockNum: Int!<br><br>}<br><br><br>type UrlRegisteredEvent @entity {<br><br>  id: ID! #id is a required field<br>  url: String! @index(unique: false)<br>  owner: String! @index(unique: false)<br>  active: Boolean!<br>  blockNum: Int!<br><br>}</pre><p>This uses the GraphQL standard, which is important to get familiar with if you’re planning to use Subquery.</p><h4>4. Mapping logic</h4><p>The code to transform the data and load it into the indexed databases is pretty straightforward JavaScript code located in the src folder.</p><p>By default, Subquery will provide data access functions to load into Postgres, so we added a plugins directory to code for pulling the metadata from websites, Neo4J and Elastic Search.</p><h4>5. Additional changes</h4><p>We also added Neo4j, ElasticSearch and Kibana to the services in docker-compose.yml (they all provide ready-to-use docker images.)</p><p>Also, one important part to understand about Subquery: the mapping logic code runs in a <strong>sandbox</strong>, which is restricted by default to a minimal set of dependencies. And as of current version, it doesn’t provide a way to easily extend the list of dependencies. So the workaround was to modify the following file directly inside the docker image of the Subquery engine:</p><pre>/usr/local/lib/node_modules/@subql/node/dist/indexer/sandbox.service.js</pre><p>Finally, all dependencies were pinned to specific versions to facilitate reproducibility.</p><pre>&quot;devDependencies&quot;: {<br>  &quot;@polkadot/api&quot;: &quot;7.5.1&quot;,<br>  &quot;@subql/cli&quot;: &quot;0.19.0&quot;,<br>  &quot;@subql/types&quot;: &quot;0.13.0&quot;,<br>  &quot;@types/chai&quot;: &quot;4.3.0&quot;,<br>  &quot;@types/mocha&quot;: &quot;9.1.0&quot;,<br>  &quot;chai&quot;: &quot;4.3.4&quot;,<br>  &quot;cheerio&quot;: &quot;1.0.0-rc.10&quot;,<br>  &quot;mocha&quot;: &quot;9.1.4&quot;,<br>  &quot;neo4j-driver&quot;: &quot;4.4.1&quot;,<br>  &quot;node-fetch&quot;: &quot;2.6.7&quot;,<br>  &quot;typescript&quot;: &quot;4.5.5&quot;<br>}</pre><p>And that’s pretty much it, there a few more little details that we changed after the initialization of the project, all documented in template_change_log.md but the main ones above are really all you need to know if you’re planning to build an ETL with Subquery.</p><h4>6. Building and running</h4><p>There are 3 steps to start the ETL:</p><ul><li>Generate the model classes</li><li>Compile the JavaScript code into TypeScript.</li><li>docker-compose up!</li></ul><p>You’ll find the exact how-to in the readme.md doc.</p><h3>Wika Blockchain Data</h3><p>With your ETL up and running, the blockchain data will be synced into Postgres, Neo4j and ElasticSearch, and here is how it looks like!</p><h4>1. Postgres</h4><p>Here are the tables and columns you will find in Postgres</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6ij1BjLqwio0NJzZXn6p5w.png" /><figcaption>block_infos</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qmWPL4-zEVZPGrMC9sj_Pw.png" /><figcaption>like_events</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wzDmhqcKmgrwLxBBEN_t9Q.png" /><figcaption>url_metadata</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IVLj8JX2wzQgrqGnCLldRA.png" /><figcaption>url_registered_event</figcaption></figure><p>The Postgres data can also be queried using GraphQL, which should be running at localhost:3000</p><h4>2. Neo4J</h4><p>Neo4J provides an interesting alternative to explore the data from a graph perspective instead of tables:</p><ul><li>Each user is represented by a node (User class) and includes the total number of likes sent.</li><li>Each URL is represented by a node (Url class.) and includes the total number of likes received.</li><li>Likes are represented by the relationship LIKES, storing the number of likes as well.</li><li>Ownership are represented by the relationship OWNS.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7fqaFsHXGJdNleudO_2v4Q.png" /></figure><p>You can connect to the Neo4J browser at localhost:7474 and use the CQL query language to explore the data set.</p><h4>3. Elastic Search</h4><p>The docker-compose comes with a Kibana service (front end for Elastic Search), and can be accessed at localhost:5601</p><p>You will find each Url represented as a document with the fields title, description, image and icon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JeJ9b1BtLrawyu71lYD8Eg.png" /></figure><h3>That’s all folks!</h3><p>Hope you found this Subquery use case helpful, and enjoy Wika’s data!</p><p>If you need help with this repo, or any feedback, you can reach us on <a href="https://discord.com/invite/sPEwJUmAwH">discord</a> or through github issues.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbb936cb27c3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Wika Network]]></title>
            <link>https://wikanetwork.medium.com/introducing-wika-network-8c21a34b7f5b?source=rss-b6087578cbf0------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c21a34b7f5b</guid>
            <dc:creator><![CDATA[Wika Network]]></dc:creator>
            <pubDate>Tue, 08 Feb 2022 01:37:36 GMT</pubDate>
            <atom:updated>2022-02-09T22:15:54.287Z</atom:updated>
            <content:encoded><![CDATA[<p>A public blockchain infrastructure to empower web content consumers, authors and recommendation systems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*b7VCqpmrHqCnsswr" /></figure><h4>Rayan’s tragedy</h4><p>Last week a tragic story from my home country caught my attention, as it captivated millions of Moroccans and others around the world.</p><p>A father was fixing a well near his house when his 5-year old boy, Rayan, fell in. After multiple attempts to rescue him through the narrow hole, the rescuers concluded that it was impossible. They undertook a monumental alternative plan of digging another 32 meter deep hole near the well, then a 6 meter horizontal tunnel.</p><p>With the oxygen, water, and a camera brought to Rayan through a pipe, he appeared to be moving, and there were good reasons for hope during the five day non-stop complicated rescue operation. But unfortunately, the outcome was tragic and Rayan did not make it.</p><p>I live in Canada, six time zones away from the small Moroccan village where this event happened. During the late night hours at home I could not get updates from official sources, and I turned to social networks for information. Of course, the majority of people were broadcasting hope, prayers and solidarity; but there was also a sizable amount of racist tweets, fake videos of a boy being “saved”, and clickbait live streams. I found all possible means to steal attention, attract clicks or likes, with no respect to truth or decency.</p><h3>The Problem</h3><p>When we first started thinking about Wika a year ago, we knew about the issues related to AI powered social networks as most of the team comes from Data Science and Machine Learning backgrounds. We are intimately familiar with content related problems such as propaganda, plagiarism, echo chambers, and the psychological impacts of doomscrolling.</p><p>But the behaviors I observed in Twitter and Facebook during those five days were a very sad concrete example of how social media is designed to keep my eyes on a screen, not connecting people together.</p><p>One could argue that the problem has nothing to do with technology — these are simply bad actors who need to be dealt with using regulation. But the truth is, the current economic incentives of social media platforms lead to this outcome, and the situation is only worsening with time.</p><h3>The root cause</h3><p>These posters simply adapted to fit what social media platforms want from them: they provide the fuel to catch your attention so you’ll view ads and keep scrolling!</p><p>Social media platforms have armies of data scientists targeting the same objective function — advertisement conversion rate. Even if they included rewards for the content creators, by sharing the ad revenue or similar, it’s not their goal to optimize for content quality. Content promotion is automated with little consideration for the people involved.</p><p>Decades ago consumers had to pay for access to content, and the creators of that content were directly funded by those consumers. Now we get it for “free”, along with a heavy non-monetary cost. We pay by giving them our attention while they sell us something — a product, a political opinion or a cultural trend.</p><p>This new paradigm opened by social media allows for interaction between content creators and consumers like never before, but it also creates new risks and harmful incentives.</p><h3>The solution</h3><p>The Wika network proposes a new model that restores the relationship between content creators and consumers, where we directly reward the original authors, all powered by blockchain technology, to remove the unnecessary men-in-the-middle.</p><p>Anyone can register a webpage to their wallet address with a simple transaction, as long as they can insert a mark in the page to prove their ownership. Then by clicking a simple Like button, consumers can directly fund the author’s wallet.</p><p>Moreover, sending Likes plays the role of advertising, and the consumers get rewarded by receiving a share of future Likes for the content they discovered.</p><p>Finally, because everything is recorded in a public ledger, the data will be available to any agent willing to play the role of a recommender system. There will be an open competition among data scientists to harness this data and improve the user’s experience.</p><p>Facebook wants to keep you on their page so their advertisers can push their message. The content is an afterthought. In this new system we propose, you use a website that is simply trying to find you the page that you are most likely to send money to directly, because you appreciate the content.</p><p>At this point, the most obvious criticism of this approach is — what if the consumer doesn’t want to pay? But the system doesn’t need all of its users spending money. A small fraction of generous consumers or dedicated patrons is enough to trigger an economy where even the most self-centered consumers would still send money to earn future rewards from their “investment” in the page. The agents sending the Likes are also playing the role of the advertisers, and if the content takes off the system will reward them accordingly.</p><h3>The Principles</h3><p>Is this an absolute solution to the problem? No. At least not from day one.</p><p>The Wika network is an attempt to deploy the infrastructure to solve the problem.</p><p>We are building it as a community, driven by three foundational principles:</p><ul><li>Transparency</li><li>Decentralization</li><li>Privacy</li></ul><h4>1. Transparency</h4><p>The Wika blockchain is a public ledger that keeps a record of who can receive proceeds from a given piece of online content and who has sent Likes to said content. Anyone can access this information to deploy recommendation or aggregation systems and provide consumers with links.</p><p>Anyone can audit the contents of this database to analyze the provenance of Likes and distinguish organically liked content from artificially pumped numbers.</p><p>In order to Like a piece of content the user actually sends real money to the author, which makes content popularity much harder to fake than a simple click.</p><h4>2. Decentralization</h4><p>With a completely public database, there will be competition between recommender systems. Users will be able to compare and choose between different options, and hopefully the best solutions will be adopted by the users.</p><p>Also, in our decentralized framework, many components will be open source and public, making it easier to study, challenge, and improve.</p><p>This principle alone doesn’t guarantee that such an ecosystem won’t reproduce the same flaws from centralized platforms. But at the very minimum, it will remove the barrier to entry to propose and deploy an alternative.</p><p>It is extremely hard to challenge the content aggregating methods used by popular platforms, as both the data and their teams operate in an opaque corporate environment.</p><p>In contrast, the core of the Wika network is a smart contract, and its rules will evolve with the community without a central authority. Its goals will align with its users — the content creators and the consumers.</p><h4>3. Privacy</h4><p>As mentioned previously: the Wika blockchain is a public ledger storing <strong>who</strong> can receive proceeds from a webpage, and <strong>who</strong> likes these contents.</p><p>The word <strong>who</strong> in the above is synonym for <strong>wallet address</strong> and no more.</p><p>The actual person who owns the wallet can choose to remain anonymous. Users will fully control how much of their identity they want the rest of the world to know about that wallet address, while gaining all the advantages of sharing their preferences with the community.</p><h3>What if all this actually made it worse?</h3><p>In a world where the number of likes and followers is already a measure of social status, the Wika network will add a currency to this measure that can be directly exchanged for a dollar value. Our system could create a direct monetary incentive for bad actors to manipulate content.</p><p>Moreover, in a world where internet platforms already collect too much information about their users, this will be an additional source of data. If companies manage to associate a wallet address with an individual it will only worsen the situation.</p><p>These are hard questions. To be honest, we are still early in the project and don’t have all the answers yet.</p><p>We believe in the decentralization movement and returning power back to the consumers and content creators. We want to create the foundation of a solution using our outlined principles one step at a time, starting with the Wika network.</p><h3>What does the system look like?</h3><p>We are still building the prototype solution, and many details of the smart contracts and user experience are still being iterated on, but we have already deployed some components to test the design:</p><h4>1. Like Button</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8yNQT4CCohr-RlRU" /></figure><p>Wika Widget</p><p>We are testing and developing different variations of the UX:</p><ul><li>a browser extension that reads a web page widget;</li><li>a minimal Like button that opens a pop up;</li><li>plugins for developers to add the Wika button with one line of code.</li></ul><p>Our objective is to iterate until we converge to the simplest possible UX and integration framework.</p><h4>2. Registering a web page</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EbSXZdu-qe6t7eFo" /><figcaption><a href="https://app.wika.network/">https://app.wika.network</a></figcaption></figure><p>Content creators will mark their page and send a request to the blockchain.</p><p>This feature is ready and can be easily tested by following the instructions<a href="https://www.wika.network/docs/guides/claim-ownership"> here</a>.</p><h4>3. The Blockchain</h4><p>The blockchain test net is up and running. It is based on the Substrate framework, making it flexible to operate as an L1 standalone blockchain or evolve into a Kusama/Polkadot L2 blockchain in the future.</p><p>It can be monitored with the<a href="https://telemetry.polkadot.io/#list/0x59732b25bb635769e91a71f818c6d845b9bdcd371bb93d1512b1eacedb53d4be"> polkadot telemetry</a>; and scanned at<a href="https://scan.wika.network/"> https://scan.wika.network</a></p><h4>4. The Data</h4><p>We just released an ETL<a href="https://github.com/randombishop/wika_etl"> GitHub repo</a> to extract data from the blockchain and load it into different databases.</p><p>This ETL provides an easy way to index the Wika blockchain data into three databases:</p><ul><li>as tables in Postgres;</li><li>as a graph in Neo4J;</li><li>as documents in Elastic Search.</li></ul><p>For more details on how it works and what the data looks like, check out<a href="https://wikanetwork.medium.com/the-wika-network-dataset-bbb936cb27c3"> this article</a>.</p><h3>What’s next?</h3><p>Build. Test. Rinse. Repeat.</p><p>Developers, authors, journalists, artists, inventors, dreamers, whoever you are, you will be welcome in our<a href="https://discord.com/invite/sPEwJUmAwH"> discord server</a>.</p><p>Worst case scenario — we learn something together.</p><p>And if we succeed we will make the internet a better place.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c21a34b7f5b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>