Posts

[ EN | ES ] IPFS: Shapeshift and a journey towards full decentralization | IPFS: Shapeshift y un viaje hacia la descentralización completa

avatar of @foxlatam
25
0 views
·
10 min read

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.

In order to bypass the limitations of centralized hosting, ShapeShift DAO began the journey to decentralizing our frontend 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 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 unstoppable.

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, and 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’s only created once, which helps keep the network 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 ShapeShift to utilize IPFS 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. The purpose of the object is to tell IPFS which commit came before it and link 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. 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 nodes that go offline, that file then becomes unavailable and no one can grab a copy of it. A bit like BitTorrent swarms without seeders. To address this, ShapeShift utilizes Fleek, a suite of tools for uploading, pinning, and fetching files from IPFS.

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. As we now move onto the final step in decentralizing our platform through FOXChain, we are closer than ever to providing our users with unstoppable access 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/


Español

Como un DAO, la Internet (Web2) es una herramienta tan importante en nuestra vida cotidiana. Lo usamos para consumir medios, comunicarnos con amigos y colegas, aprender, manejar nuestras finanzas y mucho más. Pero la web tal como la conocemos tiene un problema: la información que contiene está centralizada en gran medida. Todo está almacenado en grandes granjas de servidores, que generalmente están controladas por una sola empresa.

¿Alguna vez te has preguntado qué pasaría si sitios como YouTube o Wikipedia quedaran fuera de línea? ¿Cómo verías videos de gatos o pasarías horas leyendo una página de Wikipedia tras otra?

La centralización trae consigo otro problema, y es la censura. Debido a que el contenido está alojado en unos pocos servidores, es fácil para los gobiernos bloquear el acceso a ellos. Por ejemplo, en 2017, Turquía ordenó a los proveedores de Internet que bloquearan el acceso a Wikipedia porque la administración lo calificó como “una amenaza para la seguridad nacional”. Esencialmente, la centralización de Internet no es algo bueno, especialmente cuando se trata de activos descentralizados en lugares como app.shapeshift.com.

Con el fin de evitar las limitaciones de alojamiento centralizado, ShapeShift DAO comenzó el viaje para descentralizar completamente nuestra interfaz a través de IPFS (Sistema de archivos interplanetario). El 2 de junio de 2022 marcó el día en que ShapeShift pasó al alojamiento descentralizado en IPFS. Esto significa que la aplicación ShapeShift ya no está sujeta a los problemas del alojamiento web2 centralizado. Ahora cualquiera puede tomar el cliente, construir y verificar contra lo que está en IPFS y alojar una copia ellos mismos. Una vez que lancemos FOXChain, que nos otorga acceso descentralizado a los datos del nodo, no habrá una parte centralizada o censurable de toda la pila; lo que significa que ShapeShift sería completamente imparable.

## ¿Por qué seguimos usando Internet centralizado?

Tenemos grandes expectativas cuando se trata de Web2. Queremos que las páginas, las imágenes y los videos se carguen al instante y los queremos en alta calidad. La centralización de servidores permite a las empresas tener un control total sobre la rapidez con la que pueden entregar todo este contenido; a partir de ahora, simplemente no existe una alternativa buena y rápida.

Cómo funciona Web2 Internet y qué cambia IPFS

Antes de hablar sobre cómo IPFS puede ayudar a lograr estos objetivos, primero debe comprender cómo accedemos al contenido en la web en este momento. Digamos que quieres descargar una foto de Internet. Cuando haces eso, le dices a la computadora exactamente dónde encontrar la foto. En este caso la ubicación de la foto es la dirección IP o el nombre de dominio. Esto se denomina direccionamiento "basado en la ubicación". Le dices a la computadora dónde obtener la información, pero si esa ubicación no es accesible, por ejemplo, el servidor está caído, no obtendrás la foto. Sin embargo, existe una alta probabilidad de que alguien más haya descargado esa imagen antes y todavía tenga una copia de ella y, sin embargo, su computadora no podrá obtener una copia de esa persona. Para solucionar esto, IPFS pasa del direccionamiento "basado en la ubicación" al direccionamiento "basado en el contenido". En lugar de decir “dónde” encontrar un recurso, simplemente diga “qué” es lo que quiere.

¿Cómo funciona IPFS?

Cada archivo tiene un hash único, que se puede comparar con una huella digital. Cuando desea descargar un determinado archivo, le pregunta a la red: "¿quién tiene el archivo con este hash?" y alguien en la red de IPFS se lo proporcionará. Ahora podrías pensar: espera un minuto, ¿cómo sé que esa persona no ha manipulado el archivo? Bueno, como usaste un hash para solicitar el archivo, puedes verificar lo que has recibido. Solicitas el archivo con un determinado hash, y cuando recibes el archivo compruebas si el hash coincide.

Otra buena característica del uso de hashes para abordar el contenido es la de duplicación. Cuando varias personas publican el mismo archivo en IPFS, solo se crea una vez, manteniendo la red sea eficiente.

Almacenamiento de archivos y hacerlos accesibles

Los archivos se almacenan dentro de objetos IPFS, y estos objetos pueden almacenar hasta 256 kb de datos y contener enlaces a otros objetos IPFS. Un simple archivo de texto "Hola Mundo", que es muy pequeño, se puede almacenar en un solo objeto IPFS. Los archivos de más de 256 kb, como una imagen o un video, se pueden dividir en varios objetos IPFS que tienen un tamaño de 256 kb y, luego, el sistema creará un objeto IPFS vacío que vincula a todas las demás partes del archivo. Esta arquitectura permite a ShapeShift usar realmente IPFS como un sistema de archivos. Debido a que IPFS usa direccionamiento basado en contenido, una vez que se agrega algo, ya no se puede cambiar. Es un almacén de datos inmutable muy parecido a una cadena de bloques.

Sin embargo, IPFS admite el control de versiones de archivos. Si está trabajando en un documento importante que desea compartir con todos a través de IPFS, IPFS creará un nuevo "objeto de confirmación" para usted. Este propósito del objeto es decirle a IPFS qué compromiso vino antes y vincula al objeto IPFS de su archivo. Si desea actualizar este archivo, puede agregar su archivo actualizado a la red IPFS y el software creará un nuevo objeto de confirmación. Este objeto de confirmación ahora se vincula con la confirmación anterior y puede repetirse indefinidamente. IPFS se asegurará de que su archivo, además de todo su historial, sea accesible para los demás nodos de la red.

## Limitaciones o Inconvenientes

El mayor problema que enfrenta IPFS es mantener los archivos disponibles. Cada nodo de la red guarda un caché de los archivos que ha descargado y ayuda a compartirlos si otras personas los necesitan. Pero si un archivo específico está alojado en nodos que se desconectan, ese archivo deja de estar disponible y nadie puede obtener una copia de él. Un poco como los enjambres de BitTorrent sin seeders. Para abordar esto, ShapeShift utiliza Fleek, un servicio.

## Cómo se puede utilizar IPFS

Como se menciono anteriormente, en 2017 el gobierno turco decidió bloquear el acceso a Wikipedia.

La gente detrás de IPFS respondió tomando la Wikipedia turca y poniendo una copia

en IPFS. Debido a que IPFS se distribuye y no hay servidores centrales, el gobierno no pudo

bloquearlo Otra buena aplicación es DTube, que es un sitio como YouTube pero completamente

distribuye y aloja en IPFS. Cualquiera puede publicar videos y cualquiera puede ayudar a mantener la red.

¿Por qué se llama IPFS el sistema de archivos interplanetario?

¿Es adecuado para funcionar a través de múltiples planetas? Bueno, supongamos que tenemos una base en Marte. La comunicación de Marte a la Tierra es bastante difícil. Dependiendo de la posición de los dos planetas, una señal puede tardar entre 4 y 24 minutos en viajar entre ellos. Tomemos el mejor de los casos: estás en Marte, abres tu computadora portátil y solicitas una copia de la página de Wikipedia del planeta Tierra porque has olvidado cómo es allí. La solicitud a Wikipedia viaja cuatro minutos a la Tierra, y cuando llega allí, se envía por Internet a los servidores de Wikipedia, que responden en apenas unos milisegundos. Esa respuesta, sin embargo, todavía tiene que viajar cuatro minutos de regreso a Marte. Entonces, en un buen día, visitar una sola página web te llevará ocho minutos. En un mal día, 48 minutos. Con IPFS es posible almacenar en caché grandes partes de Internet en Marte. Entonces, si alguien ya solicitó una página que desea descargar, puede provenir directamente de un nodo en Marte, lo que hace que la página se cargue tan rápido como lo haría en la Tierra. Entonces, sí, IPFS podría usarse para distribuir partes de Internet en varios planetas.

## El futuro del acceso DeFi con ShapeShift

Nuestro cambio al alojamiento descentralizado en IPFS nos posiciona mejor que nunca como el líder de las finanzas verdaderamente descentralizadas y sin permisos. No podríamos estar más emocionados por el futuro de ShapeShift usando IPFS y ahora que avanzamos hacia el paso final en la descentralización de nuestra plataforma a través de FOXChain, estamos más cerca que nunca de brindarles a nuestros usuarios un punto de acceso auténtico al universo DeFi. Acceda a su cinturón de herramientas DeFi de ventanilla única sin cargos adicionales en app.shapeshift.com.

Todas las cadenas, todos los protocolos, todas las carteras. Comparte nuestra visión en app.shapeshift.com.

Recursos adicionales:

https://discord.gg/shapeshift https://shapeshift.com/ https://medium.com/@ShapeShift.com
https://forum.shapeshift.com/
https://boardroom.io/shapeshift/