Money on chain Interface (dapp) + IPFS
- To continue with the decentralization path for MOC protocol, we have created a mechanism for the community to host the Money on chain Interface (dapp).
- The open-source Money on chain Interface (dapp) built by our team and community is automatically deployed on each release to IPFS.
- The URL alpha.moneyonchain.com now forwards to dapp.moneyonchain.com
- Community members can pin the IPFS hashes to ensure availability.
- dapp.moneyonchain.com is now served exclusively from the latest IPFS release. However, any IPFS gateway can be used directly.
MOC path to decentralization
As we announced a few months ago, going live on IPFS was the final step towards decentralization outlined in 2019 when we started working on Money On Chain.
The Money On Chain protocol is trustless and decentralized because it lives entirely on-chain. Anyone running an RSK node can interact with contracts directly, which will perform as programmed for as long as RSK exists. However, only some people want to run a node. Instead, many users choose to interact with Money On Chain through web interfaces, trade aggregators, wallets, or other DAPPs that have integrated MOC natively into their smart contracts.
Also, when using an interface, users should verify the transactions they sign to match the transaction presented by the interface. This is a challenging process, and why using reputable interfaces is essential.
Open source interfaces allow users to verify the code they are interacting with does what it claims. If a user runs the code locally, they can confidently make transactions. However, as soon as the code is hosted, it is difficult for users to verify the website they are interacting with has yet to be modified.
This is one of the problems that IPFS aims to solve.
IPFS is a distributed system for storing and accessing files, websites, applications, and data (You can read more about IPFS in their documentation).
Now Money On Chain DAPP is an independent website on the distributed peer-to-peer file network known as InterPlanetary File System.
What we did
Our team has always cared about decentralization, security, and accessibility. This is why we built an open-source interface for Money On Chain that the community can directly run, verify and build upon.
Using GitHub Actions, the Money On Chain Interface is deployed to IPFS on each release. Each release is automatically pinned using pinata.cloud, a free IPFS pinning service. The IPFS releases can be found on GitHub.
This means the Money On Chain Interface can now be accessed via IPFS directly, through a gateway such as cloudflare-ipfs.com, or by an alias to the gateway at dapp.moneyonchain.com.
The domain alpha.moneyonchain.com is now redirected to dapp.moneyonchain.com, which is an alias to a IPFS gateway that serves the Money on Chain Interface from IPFS.
How we did it
The dapp.moneyonchain.com subdomain is given a CNAME record pointing at IPFS gateway.
When a user visits the domain dapp.moneyonchain.com, the browser first looks up the DNS record and finds a CNAME to the IPFS gateway and brings the content of the latest release.
The IPFS gateway then fetches the content using the IPFS protocol and serves the interface to your browser via HTTPS.
Verifying a build
You can check what build you are being served from IPFS gateway by looking at your browser’s network console for the response headers sent directly from IPFS gateway.
How can you help
To keep the Money On Chain Interface available, you can pin the hash of the latest release.
Note: this technical document is inspired in Uniswap documentation for IPFS.