As a DAO, the internet (Web2) is such an important tool in our everyday life. We use it to consume media, communicate with friends and colleagues, learn, handle our finances, and much more. But the web as we know it has a problem: the information on it is largely centralized. It’s all stored on big server farms, which are usually controlled by a single company.

Have you ever wondered what would happen if sites like YouTube or Wikipedia would go offline? How would you watch cat videos or spend hours reading one Wikipedia page after the other? Centralization brings another problem with it, and that is censorship. Because content is hosted on just a few servers it’s easy for governments to block access to them. For example, in 2017 Turkey ordered internet providers to block access to Wikipedia because the administration called it “a threat to national security.” Essentially, centralization of the internet is not a good thing一especially when you are dealing with decentralized assets on places like app.shapeshift.com

We saw this as a large potential problem for our decentralized web app, we began the journey to completely decentralize our hosting through IPFS (Interplanetary Filesystem). June 2nd, 2022, marked the day that ShapeShift cut over to decentralized hosting on IPFS. This effectively means that the ShapeShift app is no longer subject to the difficulties and issues of centralized web2 hosting. Anyone can now take the client, build and verify against what is on IPFS, and host a copy themselves, another major milestone in ShapeShift’s complete decentralization. CDN (content delivery network) or DNS (domain name system) are no longer points of failure for our app. Once we launch FOXChain一granting us decentralized access to node data一there will be no centralized or censorable part of the entire stack; meaning that ShapeShift would be completely uncensorable.

Why Do We Keep Using Centralized Internet?

We have high expectations when it comes to Web2. We want pages, images, and videos to load instantly, and we want them in high quality. Centralizing servers allows companies to have complete control over how fast it can deliver all of this content一as of now, there just isn’t a good and fast alternative. 

How Web2 Internet Works and What IPFS Changes?

Before we talk about how IPFS works, you first have to understand how we access content on the web right now. Say you want to download a photo from the internet. When you do that, you tell the computer exactly where to find the photo. In this case, the location of the photo is the IP address or the domain name. This is called “location-based” addressing. You tell the computer where to get the information, but if that location isn’t accessible一e.g., the server is down一you won’t get the photo. However, there is a high chance that someone else has downloaded that picture before and still has a copy of it, and yet your computer won’t be able to grab a copy from that person. To fix this, IPFS moves from “location-based” addressing to “content-based” addressing. Instead of saying “where” to find a resource, you just say “what” it is you want.

How Does IPFS Work?

Every file has a unique hash, which can be compared to a fingerprint. When you want to download a certain file, you ask the network: “who has the file with this hash?” and someone on the IPFS network will provide it to you. Now you might think: hold on a minute, how do I know that that person hasn’t tampered with the file? Well, because you used a hash to request the file, you can verify what you have received. You request the file with a certain hash, so when you receive the file you check if the hash matches with what you have received. 

Another nice feature of using hashes to address content is deduplication. When multiple people publish the same file on IPFS, it will only be created once, and that makes the network very efficient.

Storing Files and Making Them Accessible

Files are stored inside IPFS objects, and these objects can store up to 256kb worth of data and contain links to other IPFS objects. A simple “Hello World” text file, which is very small, can be stored in a single IPFS object. Files larger than 256kb like an image or video can be split up into multiple IPFS objects that are all 256kb in size, and afterward, the system will create an empty IPFS object that links to all the other pieces of the file. This architecture allows us to really use it like a filesystem. Because IPFS uses content-based addressing, once something is added, it cannot be changed anymore. It’s an immutable datastore, much like a blockchain一click here to learn more

However, IPFS supports versioning files. If you are working on an important document that you want to share with everyone over IPFS, IPFS will create a new “Commit object” for you. This object is really basic: it just tells IPFS which commit went before it and links to the IPFS object of your file. If you want to update this file, you can add your updated file to the IPFS network and the software will create a new commit object for your file. This commit object now links to the previous commit and can be repeated endlessly. IPFS will make sure that your file, plus its entire history, is accessible to the other nodes on the network. 

Limitations or Drawbacks

The biggest problem that IPFS faces is keeping files available. Every node on the network keeps a cache of the files that it has downloaded and helps to share them if other people need them. But if a specific file is hosted by—let’s say these 4 nodes—and those nodes go offline, that file then becomes unavailable and no one can grab a copy of it. A bit like BitTorrent swarms without seeders. ShapeShift has two possible solutions for this problem. Either we incentivize people to store files and make them available or we can proactively distribute files and make sure that there are always a certain number of copies available on the network.

How IPFS Can Be Used?

As mentioned earlier, in 2017 the Turkish government decided to block access to Wikipedia. The people behind IPFS responded by taking the Turkish Wikipedia and putting a copy of it on IPFS. Because IPFS is distributed and there are no central servers, the government couldn’t block it. Another nice application is DTube, which is a site like YouTube but entirely distributes and hosts on IPFS. Anyone can publish videos and anyone can help to support the network. 

The Future of DeFi Access with ShapeShift

Our cut over to decentralized hosting on IPFS positions us better than ever as the leader for truly decentralized, permissionless finance. We couldn’t be more excited for the future of ShapeShift using IPFS, and as we now move onto the final step in decentralizing our platform through FOXChain, we are closer than ever to providing our users with an authentic access point to the DeFi universe. Access your one-stop DeFi tool belt with no added fees at app.shapeshift.com

All Chains, All Protocols, All Wallets. Share Our Vision at app.shapeshift.com

Additional Resources

https://discord.gg/shapeshift

https://shapeshift.com/

https://medium.com/@ShapeShift.com

https://forum.shapeshift.com/

https://bit.ly/3Kp45sY