The Importance of Decentralization in DeFi
Socbay is the Europe dev team of Crust, granted by Decentralized Cloud Foundation
DeFi — short for Decentralized Finance, is a common name for the applications build on blockchains that allow people to lend or borrow funds from others, speculate on price movements on a range of assets using derivatives, trade cryptocurrencies, insure against risks, and earn interest in savings.
The mechanism behind each DeFi is transparent and lives entirely on-chain. This mechanism is called “Smart Contract” on Ethereum/ Binance Smart Chain/ Polygon…and called “Program” on Solana. We’ll call it “Smart Contract” in this article because this word has been widely used for some years to refer to an executable program lived on the blockchain.
Anyone can run a node and interact with the smart contract for all possible operations. However, this process is too complicated for public users. Therefore each DeFi has a graphic interface that allows users to interact with the smart contract. In most cases, the interface is simply a website that requires a server to be alive. If the server is attacked or shut down by its foundation, public users can’t interact with the smart contract anymore, which would create harmful consequences because DeFi relates to valuable assets.
Understanding this risk, some DeFi apps started using decentralized solutions for their interfaces. Uniswap is a typical example for their effort of decentralizing all the things:
- Smart contract is lived on Ethereum blockchain
- Interface is lived on IPFS and pinned on Crust Network that offers the decentralized pinning service of IPFS
- Domain on decentralized Ethereum Name Service (https://uniswap.eth)
Suppose external or internal factors stop https://uniswap.org, in that case, users can always access Uniswap using one of the following ways:
- Using decentralized domain: https://uniswap.eth.link. The decentralized domain is literally unstoppable.
- Accessing by its CID. E.g., Release v4.12.18 has the CID of “QmaZd2YyCDLuwLa8joRLU9hAWFacDJVFpn5xPvUpMME3jT”. Users can access this CID by either:
- Running a simple IPFS node and access through URL protocols ipfs://QmaZd2YyCDLuwLa8joRLU9hAWFacDJVFpn5xPvUpMME3jT
- Using an HTTP gateway. There are many public gateways that users can use, e.g., https://ipfs.io/ipfs/QmaZd2YyCDLuwLa8joRLU9hAWFacDJVFpn5xPvUpMME3jT
Pinning the interface on IPFS is one of the features that Crust Network can support. Website pinned on Crust Network has some advantages that centralized solutions don’t have:
- High decentralization, security, and accessibility
- Unlimited bandwidth, there are currently 200k IPFS nodes (reference: https://protocol.ai/ — creator of IPFS), the interface could ask these nodes to store partial data on their cache for a short time, the more traffic the website has, the faster the website is
- Unstoppable by external factors and even by the team who is building the website
Developers can refer to the following resources to learn how to deploy their website on Crust Network:
- Wiki docs: https://wiki.crust.network/docs/en/buildIntegrationWebsiteHosting
- Crust IPFS Web3 Auth Gateway for Github Workflow: https://github.com/marketplace/actions/crust-ipfs-upload
- Crust IPFS pin for Github Workflow: https://github.com/marketplace/actions/crust-ipfs-pin
- Crust Network on Uniswap Release Workflow: https://github.com/Uniswap/uniswap-interface/blob/main/.github/workflows/release.yaml