DLUX IPFS Gateway Mirror and Decentralization Incentives!

in #dlux3 years ago (edited)

Decentralized Limitless User eXperiences

DLUX is Open

We almost live up to that name right now. My last post showed how to mirror the functionality of our front-end, dlux.io. Our token architecture is a true decentralized side chain to Hive with at least 10 Hive users having some experiance with running a node. It includes a true DEX that allows the node operators to facilitate atomic swaps currently between DLUX and HIVE with out an intermediary token and exceptionally low fees.

While the DLUX paradigm was initially developed to tackle accessible VR on blockchain our methods allow for the distribution of any kind of browser based application to be distributed at the cost of a post on HIVE... which can earn rewards both in HIVE and DLUX. Web Apps, AR, VR... WASM programs loaded via in browser JS. The possibilities are literally endless.

We've opened sourced all of our code and methods, allowing anybody who wants to build a decentralized community to do so for exceptionally low cost and no fees to non-interested parties.

This post is here to convey the methods for setting up an IPFS Gateway so that our project continues along the path of decentralization. As these methods are technical they'll be at the bottom of this post.

Incentives for Decentralization

The way our token distribution is set up, we've issued around 12M tokens. About 6M of these tokens are in our dlux-io account and are hard coded to not be allowed for content voting. There is a mechanism to increase token supply to 100M via HIVE Token investment with roughly the first million going to the founders(myself and @markegiles) and subsequent HIVE donation being spread across the token holders in the ecosystem via an AMM.

The dlux-io stake now has 1,000,000 DLUX set aside as an incentive for mirrors and on chain-forks of dlux.io
You can be a straight mirror, rebranded or refocused. Hive Posts with both an IPFS hash and a 10% beneficiary fee currently are added to the DLUX token rewards system. Upon the first mirror being set up, this fee will drop to 10% overall, with up to 9.99% going toward your sites account(these fees are mostly to pay for running the front-end, IPFS gateway, and paying for IPFS content pinning).

To ensure a bit of fairness and discourage sock-puppeting our 1M stake will be divided monthly based on the rewards posts from your front-end generate. 100K tokens per month. Mirror A generates 100Hive and Mirror B generates 900 Hive: A receives 10K DLUX and mirror B 90K DLUX. This is a 10 month program.

IPFS Method

The Inter-Planetary File System addresses it's content via a hash of the checksum of a file. This means the same files have the same resource locators and different files have different resource locators. In the past you may have been familiiar with Bittorrent or Napster, and the dangers of downloading a file only to give your computer AIDS. With a blockchain like HIVE or ETH users can sign a hash via their private keys and build trust in much the same way SSL certificates ensure the website you visit is the only one giving your browser executable code.

With a front-end like dlux.io you can post these dApps to IPFS and the public can recall them by accessing the information store and secured on the blockchains. A simple cookie with subdomain access only needs to store your hive username and all dApps can use a thin API to access Hive-Keychain functions for every imaginable interaction with HIVE.

Why subdomains? Each application on IPFS is foreign and therefore is a vector for cross scripting attacks. By serving IPFS content from subdomains (like https://disregardfiat.ipfs.dlux.io or badactor.ipfs.dlux.io) it ensures you can build any app of your choosing, with all the same browser based storage mechanisms you know and love like cookies and local storage... and nobody with out your active HIVE keys can access that same user information.

There are still a one or two methods I can think of to attack this paradigm but they can all be patched with a little research on my part and I am interested in help from people more experienced than I. If you are interested in discussing these vectors find me on discord.

IPFS Setup

You can follow the go-ipfs installation instructions. The to set up a gateway install nginx and include the following in the config file.

server {
        root /var/www; #not really used
        index index.html;
        server_name *.ipfs.dlux.io; #use your own
location ~ ^/(ipfs)/ {
                proxy_pass http://127.0.0.1:8080;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection 'upgrade';
                proxy_set_header Host $host;
}
}

Then run certbot for variable subdomains and manually re-acquire the cert every three months.

The code that pulls this together with the front end is here and should work without adjustment, but adjustments are needed for error handling.

It's possible currently to have this deliver other content if the link is from outside of the front-end... and a whitelist should be updated in an nginx config file to only allow content that is signed via the same subdomain. If you'd like to help with this, again... find me on discord.

Sort:  

We've opened sourced all of our code and methods, allowing anybody who wants to build a decentralized community to do so for exceptionally low cost and no fees to non-interested parties.

^ that's awesome, congrats mang

How can I power up my dluxtokens? Do I get more rewards for curating dluxposts? Thanks and great work guys!

Posted using Dapplr