Web2 is the web as you know it. If you’re posting pictures of your cat on Facebook, reserving a weekend getaway on Airbnb, or calling an Uber from outside the pub, you’re using Web2 technologies.

But if you think that’s as far as the internet will go, think again. Just as Web2 uses social, mobile and cloud technologies to make the internet more interactive and accessible, Web3 uses blockchain technology to make digital interactions decentralized and trustworthy.

On the latest episode of our podcast, Decoded, we talked to Patrick Collins, developer advocate at Chainlinks Labs and founder and CEO of Alpha Chain, to learn how blockchain-powered smart contracts will revolutionize the internet.

 

Securing Smart Contracts

Before Chainlink, Collins worked as a support engineer in the financial industry, including stints at a hedge fund and with a traditional financial data provider. So it makes sense that when he first heard about blockchain, he thought of it in the context of Bitcoin.

However, one day he got a call with a request for his company to bring their data on-chain. That’s when he began to learn about the world of smart contracts, which provide the ability to create a decentralized, programmable agreement that gets auto-executed on-chain without a centralized intermediary.

To simplify the process of creating and managing smart contracts, Chainlink’s decentralized oracle network connects contracts to real-world data while preventing flash loan attacks that allow hackers to find a vulnerability in the contract that can remove liquidity. By making both the data layer and logic layer decentralized, Chainlink enables reliable, tamper-proof inputs and outputs.

For example, imagine you need to file a claim with your insurance provider. Right now, your insurance provider may dispute the claim in bad faith, causing you to spend months in litigation trying to get your money. As Patrick explained:

“There’s this huge issue where it’s like, ‘Hey, we have this agreement, but I still have to trust that you’re going to do the right thing — even though you are highly incentivized not to do the right thing’.”

Smart contracts attack this problem by creating autonomous agreements that nobody owns, making agreements more transparent, enforceable, and fair.

“When people make a traditional agreement, the enforcer is going to be the government, it’s going to be the laws, it’s going to be the rules. In a smart contract world, the agreement is automatically executed by the code itself. If you make an agreement, it automatically executes; there’s no centralized intermediary, nobody has any influence over what that contract does.

This way, you don’t actually have to trust that the other person is going to do the right thing because doing the right thing is actually infrastructural with a smart contract.”

Collins said.

Chainlink isn’t just for smart contracts; by making data more decentralized and in the spirit of cryptocurrency, it hopes to make data more secure and reliable. Another example Collins shared is a fun project he created in Chainlink to create a random pizza order generator from Domino’s.

“There was one pizza that was pretty good. My favorite was half no cheese, no toppings, extra garlic, so it was just crust, which I thought was hilarious because it still got charged as a regular pizza.”

Working with Web3

While Chainlink is primarily used for decentralized finance use cases, Collins says it has the potential to power anything in the smart contract realm.

“At the end of the day, Chainlink is another developer tool. It’s a tool to build applications for people to have decentralized, autonomous agreements.”

Popular deployment frameworks are Python-based Brownie and JavaScript-based Truffle and Hardhat. While Web2 and Web3 share similar frontends, Collins says the difference is in how the backend utilizes Solidity as the backend.

“Instead of calling an API to your backend, it’s going to call an API to the blockchain and it's going to read off whatever the state of that blockchain is. It’s going to be a different environment just because you don't have the kind of ownership of your smart contracts on your backend as you do in the traditional sense.”

For developers, this adds an additional layer of caution: certainty in your deployment. In traditional web development, you can redeploy as many times as needed. As described by Collins:

“Once you deploy, once you go into production, it’s out there. If you didn't explicitly say to your smart contract, ‘You can do this,’ then you can’t do it. It's very dangerous and enlightening and also thrilling to deploy to production because you’re sweating when you do it. You’re like, ‘Okay, if this is wrong, I’m doomed."

This makes audits an essential part of the backend tech stack.

“You can’t go to production without having your code audited by people who are trusted and really understand.”

Check out this week’s Decoded podcast to learn more about the challenges and opportunities of developing for Web3 and working with smart contracts. Listen now, and subscribe to future episodes today.