MIX Acuity Decentralized Social Media 2020 Update

Posted May 13, 2020 by Jonathan Brown ‐ 58 min read

Originally published at medium.com

What is MIX Acuity?

MIX Acuity is a decentralized publishing platform in development since 2015. It has two main components:

MIX Blockchain

MIX is the blockchain component of the platform. It is based on a clone of Ethereum. All the core functionality of the system is in the form of smart contracts. This means there is no backend whatsoever. Every transaction is paid for using the MIX cryptocurrency. This is the in-app currency.

MIX has a built-in revenue stream to fund the project.

MIX currently has two full node implementations: Open Ethereum (Parity) and MIX Geth.

Support for MIX is maintained in Open Ethereum and is fully up to date.

MIX Geth is a fork of Geth. A new release is coming out soon that will pull in a lot of upstream improvements.

Open Ethereum has “fast sync” which means a new full node can have the full state available in seconds. The block headers are then verified in the background. This is used to great affect in the MIX Acuity desktop app (see below).

Acuity

The broader platform is called Acuity. This brings together many different technologies including MIX and IPFS in a standardized manner so all apps on the platform can interact.

The primary app is called MIX Acuity and is available as a web app and also as a desktop app for Windows, Mac and Linux. It is written in Vue/Typescript.

Because the app is entirely decentralized and there is no backend, there is no “service” being provided. It is peer-to-peer open source software with no warranty.

The platform has the following properties:

  • uncensorable: no one can prevent someone else from publishing
  • filterable: everyone has complete control over what content they receive
    permissionless innovation: any developer can innovate in any way they like, either on-chain or off-chain
  • public: everything that is published is publicly readable by anyone
  • private: browsing history, who you follow, local settings are only stored on your own devices. There is no centralized backend so it is very hard for your browsing to be tracked.
  • revenue generating: each content creator can have a their own token that they get paid continually. Fans can buy and burn this token to prove they like the content.
  • ungamable metrics: followers, views and likes are all terrible ways to measure popularity. Burning of the revenue tokens is much better metric.
  • funded: MIX has a 2000 day revenue stream from the blockchain. It started at 50k MIX per day and reduces by 5k MIX every 200 days. We are now on day 1050 and issuance is 25k MIX per day. Eventually a revenue token called ACUITY will take over from MIX as the source of revenue for the project.
  • open source: all software funded by the revenue stream is open source and follows the “release early, release often” methodology.

There are many different kinds of decentralized social network. MIX Acuity is entirely permanent and public.

MIX YouTube channel: https://www.youtube.com/channel/UCkvRVEWnTPWWYJQqPbYwyiw

Achieved so far

Development of MIX Acuity started in the summer of 2015 when Ethereum was being released. MIX Blockchain is a clone of Ethereum dedicated for the MIX Acuity project.

The basic idea of how MIX Acuity works is that all the core functionality is implemented in smart contracts. This includes content revisioning, comments, feeds, tags, mentions, trusted accounts, emoji reactions, tokens. There is no backend whatsoever.

Another decentralized social media project is LBRY. It is based on a clone of Bitcoin. This severely limits the complexity of what can be accomplished on-chain. Also LBRY uses the much older Bitorrent instead of IPFS. It is not practical to store a very large number of small individual content items on Bitorrent.

Being based on a clone of Ethereum means MIX Acuity has a very rich and extensible feature set that can be implemented without a backend. This means it cannot be a target for control.

Ethereum 1.x blockchains use proof of work (PoW — similar to Bitcoin). Steem and EOS use delegated proof of stake (DPos). Recent events on Steem have shown why this is insufficient for a decentralized blockchain.

https://stats.mix-blockchain.org/

Account management

While it is of course possible to use a regular externally owned Ethereum account to interact with contracts on MIX, we have a more sophisticated option.

When you create an account in MIX Acuity you actually have two addresses: an externally owned account and an account smart contract.

The account smart contract has the permanent address for the account. It has two main features:

Transferable ownership

The account smart contract will only publish transactions from its controller. Currently when MIX Acuity creates an account, the controller is the externally owned account, but much more sophisticated arrangements are possible. One or more intermediate contracts can be deployed between the external and contract accounts.

This can add a range of improved functionality:

  • change account private key
  • separate key on each device
  • social recovery
  • allow other addresses to perform certain actions from the account
  • require certain actions to require more time or multisig
  • combining multiple transactions into one to reduce gas costs

Logging

When the account receives a MIX or ERC1155 token deposit, this is logged from the smart contract. This makes it significantly easier to write wallet software.

Transaction failure error messages are also logged.

Mixins

Each content item is composed of a list of mixins. These are encoded using Google Protocol Buffers.

Each mixin can represent a different part of the content, e.g. language, title, body text, image, video, source URI, etc.

Every app developer is at liberty to create or support any mixins they want.

Mixins are also extensible. With Protocol Buffers it is possible to add new fields to existing schemas without breaking backward compatibility for software that doesn’t know about the new fields. There is an on-chain mixin inheritance tree so old software can still find useful information in new mixins derived from old ones.

Emoji Reactions

Accounts can respond to content items with emojis. Any emojis can be used, but currently the Acuity app only has a small selection the user can choose from.

The reactions are stored entirely on-chain. The MixReactions smart contract has a mapping itemId => reacting account => reactions. Reactions are stored in a single 32 bytes slot. Each UTF8 character can be 4 bytes maximum so each content item can have up to eight emoji reactions by each account.

Currently Acuity only displays emoji reactions made by accounts the active user trusts.

Web app

Initially MIX Acuity was only available as a desktop app for Windows, Mac and Linux. This was written in Typescript using technologies such as Electron and Vue.

The same app is now available at https://mix-acuity.app/ — this was a fairly easy process because the desktop app already used so many web technologies.

The web app is very useful — it is now possible to link directly to content on MIX Acuity from another website and the app is just one click away. More advanced users can then migrate to the desktop app.

Video publishing

It is now possible to publish videos directly from the desktop app. MIX Acuity uses FFmpeg to transcode the video into H.264 in multiple resolutions. Each variant is then published to IPFS. An Acuity item is then created with all the IPFS hashes, title, description, etc using Google Protocol Buffers. The item is compressed using Google Brotli and published to IPFS. The IPFS hash is then written to MIX Blockchain, producing a permanent itemId.

This is a much more sophisticated system than LBRY which does not transcode videos. This means on LBRY the user has to upload videos in a web-friendly format and viewers with low bandwidth will not be able to view the video.

This itemId can be written into the Feeds smart contract so that item appears in a user’s feed.

When viewing videos in the desktop app, it uses a local instance of go-ipfs. The HTML5 video element is provided with a local url from IPFS. This enables Electron to pull the video content directly from IPFS.

Syncing content from YouTube

As you may have noticed from the front page of MIX Acuity — there are a number of YouTube channels that are synchronized to Acuity. I wrote a script that can be left running for this to happen automatically. It uses the wonderful youtube-dl utility that also has support for many other video services.

This functionality will also be made available directly in the MIX Acuity app.

Trusted Accounts

Each user on MIX Acuity can maintain a public list of accounts they trust. By default you only see content that is owned by accounts you trust, or optionally by accounts who are trusted by accounts you trust.

This is a great way to curate who you receive content from and to grow your trust network over time.

https://medium.com/mix-blockchain/how-illegal-and-immoral-content-will-be-handled-on-mix-blockchain-e32fc25bc42f
https://www.youtube.com/watch?v=j8WfGYxBERo

In-app mining

The desktop app has mining built in. This makes it very easy to mine MIX if you have a GPU.

Wallets

MIX can be stored on the following wallets:

Exchanges

MIX is currently trading on three exchanges: STEX and Graviex. Originally it was trading on CCEX but this is now discontinued.

https://app.stex.com/en/trade/pair/ETH/MIX
https://graviex.net/markets/mixbtc
https://graviex.net/markets/mixeth

Aggregated pricing can be found on CoinGecko:
https://www.coingecko.com/en/coins/mix

Promotional events

MIX Acuity has been promoted at international events in the following countries: United States, Mexico, Indonesia, Malaysia, Thailand, Vietnam.

The largest events were:
Chiang Mai 2019: https://www.youtube.com/watch?v=lF5PZDWgmEs
San Francisco 2018: https://www.youtube.com/watch?v=obO0axRvxLo
Kuala Lumpur 2017: https://www.youtube.com/watch?v=ih1eUUm5duM

MIX Acuity was also a gold sponsor of Anarchapulco 2018.

MIX Acuity has been featured in many online videos. The most high-profile was the May 2018 interview on the Corbett Report with 10k views:
https://www.corbettreport.com/interview-1359-jonathan-brown-on-mix-blockchain/

Future direction

Increased browser / device compatibility

Apple Safari creates many issues because certain features that are in Firefox and Chrome are not implemented. Also, every browser on iOS actually uses the same engine as Safari.

Safari is not able to display WebP image files natively. This could be fixed by using a JavaScript or Web Assembly JPEG library, but may incur significant performance problems. This means that all images on MIX Acuity much be published using the old JPEG format which increases storage size and network bandwidth.

Image publishing does not currently work on Safari because the browser lacks the ability to generate JPEG files. This will be fixed by using a JavaScript or Web Assembly JPEG library.

Safari is also not able to play videos in VP9 format, so all videos must be encoded in the larger H.264 format. AV1 is set to become the successor to VP9 and Apple is signed up to the Alliance for Open Media so hopefully Safari will support it eventually.

Note that H.264 encoding is significantly slower than VP9 and AV1 so in that regard it is more suitable for desktop encoding. Eventually AV1 should have GPU encoding support which will make it encode much faster.

The desktop app is developed on Linux, so it gets the most testing on that platform. More testing needs to be done on the Windows and MacOS builds to make sure everything works.

Android now has the ability for Progressive Web Apps to be bundled up as Android apps in the Play Store so MIX Acuity will follow that direction.

Web app loading performance

Currently the web app takes too long to load and there is no indication that it is loading. This is because the main JS blob is quite large. Vue lazy loading was enabled, but this only helped slightly. The solution is for the default route to just have an animation and very minimal dependencies so it can load fast and then redirect to the main page.

Internationalization

The UI has been translated from English into Russia. There is also a Thai translation, but this was just done with Google Translate and needs improving. The UI needs translated into many more languages.

There is a language mixin. This means that each content item can identify the primary language that is used in the item. When creating content this currently defaults to the UI language.

Creator revenue

The ability to specify which token should be burned to support a content item is currently unavailable because the token burning smart contract is undergoing some improvements. This functionality will be re-enabled soon with an improved UI.

IPFS hosting

As users browse content, the IPFS files that store this content will be spread around the network.

However, it is necessary for content to be “pinned” elsewhere on the network after it has been published. This is because the publisher may go offline before their content propagates.

As a courtesy, the MIX Acuity IPFS boot nodes pin all IPFS files that have their hash written to the ItemStore smart contract on MIX Blockchain, with the exception of video content. Only video content from a whitelist of accounts is pinned.

The next step is for the desktop app to automatically pin content from trusted accounts as soon as it is published. This will help content to propagate immediately.

There also needs to be access to IPFS hosting providers from within the app. For example, Pinata and Temporal both offer IPFS hosting as a service. Filecoin is set to offer this in a decentralized manner. This will enable publishers to pay to ensure the availability of their content.

Transcoding services

Currently media transcoding occurs in the desktop app (or in the mix-sync-video-feeds script). It is not currently possible to publish video from the web app. There are many cloud transcoding services (such as Zencoder). The app needs to be able to integrate with these kinds of services.

Search

Search is a critical feature for the platform. Because MIX Acuity is data-first platform it is very well suited for search.

It will be implemented in three different ways.

Enable indexing by existing centralized web search services, e.g. Google

Currently accessing content on MIX Acuity only works by loading the whole app in the browser, querying the blockchain and pulling the content from IPFS. There is really no backend to the web app.

A backend needs to be developed so search engines can retrieve content from Acuity without needing to run the app.

Development of centralized services that directly index MIX Acuity.

There are many existing open source search solutions such as Elastic Search. Indexing all of the content on MIX Acuity using technology such as this would not be very difficult. A standardized API could be developed so users in the MIX Acuity app can choose which search indexer they wish to use.

Peer-to-peer search

All content that the app receives should be indexed. One of the new Rust based search solutions should be used for this.

This can be used for local search, but of course each instance of the app will only have indexed a small proportion of the content on MIX Acuity.

The solution is for users to be able to recursively query the index of other users in their trust network.

In order for this to happen there needs to be a means for the app to communicate with other users in the Trust Network.

Resolve content loading performance issues

Currently the app is making many blockchain queries in series, e.g. get all the items in a feed, load each item, get the profile itemId for the owner, load the item for the owner.

On the desktop app this is not an issue because the entire blockchain state is on the device. The latency for each query is negligible.

On the web app this is not the case. Each query is made over the internet. Even on low latency connections making all these queries on series soon adds up to a very significant delay in rendering content to the screen.

Use Vuex

Acuity uses the Vue frontend framework. Vuex is the state management system for Vue. Acuity is gradually migrating to use it. This will improve caching and parallel loading of content.

Single round-trip complex blockchain queries

There is a very simple technique to eliminate all these round-trip requests: write a smart contract that perform all the necessary queries of the smart contracts and return the results as one big bundle. ABIEncoderV2 really helps with this.

These read-only smart contracts don’t have any state and can therefore be redeployed with ease.

When the results come back from single query the vuex state will be updated and everything on screen will be updated to match.

The MIX smart contracts were designed to support this from the beginning. For example, revision timestamps are stored on-chain as unix timestamps as opposed to block numbers because block timestamps cannot be read from the EVM.

Usernames

MIX Acuity currently has no username / domain name system. An on-chain system needs to be implemented.

Note that on the web, usernames and domain names can be useful to determine that an account is the correct one. That is not necessary on Acuity because we have the Trusted Accounts system.

User / content discovery

With Acuity, each user has a huge amount of control over who they receive content from. The default is that you will only see content either from people you trust directly, or from people who are trusted by people you trust.

The idea is that as you find high quality content from people who are trusted by people you trust you will trust them directly and then be exposed to content from people they trust.

However, this can make it hard to get started on the platform. Until someone Trusts you will be invisible to everyone. In order for the first person to Trust you they currently need to be sent a link to your account via another communication platform. And once this person Trusts you how will you know? If you are given an alert when someone not in your Trust network Trusts you then this is an attack vector. Someone could write a bot then spams you with Trust from endless new accounts.

One way to solve this problem is for every new account to automatically add Jonathan Brown (the project founder) as a Trusted Account.

Improve layout / UI

There is endless scope for improving the user interface.

Feature cross-over desktop app / web app

While the desktop app and the web app are built from the same codebase, they run in different environments with different default features.

The web app runs in a web browser. This means browsing history, bookmarking, tabs and in-page search are all provided by the environment. None of these features are provided by Electron, the environment that the desktop app runs in. These will need to be implemented in the desktop app.

On the other hand, there are many things the desktop app can do that are not available in the browser: local MIX Blockchain node, video transcoding, mining, downloading videos from YouTube.

On the desktop, Acuity uses go-ipfs. On the web it uses js-ipfs. These two IPFS implementations have broad feature-parity, but go-ipfs has the ability to store significantly more data than js-ipfs.

Migrating settings between devices

Currently all data Acuity stores on MIX Blockchain and IPFS is public and there is no centralized backend. This creates a problem. When users migrate from device to device they are accustomed to their private settings following them. On Acuity, your Trust network is public so that follows you from device to device, but other settings do not. Which feeds you are subscribed to is a private setting and is currently set per-device.

It would be very easy to set up a centralized database for this sort of thing, but this would undermine the whole point of a decentralized autonomous platform.

A better way is to encrypt user settings and enable other users in your Trust Network to store and give you back your settings.

Clear UI distinction between on-chain and off-chain actions

Some actions in Acuity are performed by broadcasting transactions to the blockchain while others simply update the local database. This distinction needs to be made more clear in the UI because blockchain transactions are public, permanent and irreversible.

Currently the locked / unlocked state of the active account is reflected in the UI by a padlock that is either red or green. All buttons that broadcast transactions should have a red or green outline so the user knows that they are blockchain actions and whether it is currently locked or not.

External transaction signing

Currently if the active account is unlocked then many on-chain actions can be performed by simply clicking a button. This is necessary for a seamless user experience. However this is a potential attack vector. There are various technologies such as Metamask or Frame that can act as “transaction signers” to make this more secure.

On-chain wiki / research tool

MIX Acuity is a perfect fit for building an on-chain decentralized wiki / collaborative research tool.

Improving maximum transaction throughput

As in independent blockchain, MIX currently has the entire capacity of Ethereum for itself. This is fine for the time being, but a time will come when this is not enough.

A probable path forward is to migrate MIX from Ethereum to a Substrate based blockchain, potentially with the Moonbeam project.

Get involved

There are many ways to get involved and help the project. Sharing this blog post would be very useful.

Try out the web app at https://mix-acuity.app/

Join the Discord and say hello! I will help you create your account and find others to put in your Trust Network.

Buying MIX on an exchange will increase the value of MIX and therefore increase the project revenue.

This document is by no means a complete overview of the whole project, but I hope it gives you an understanding of where we are and where we are going.