
How to find high-impact AI use cases in Fintech, Banking, Telco and Insurance

30. Mar 2023
BusinessThe presentation, Q&A and this article explains the main topics of Web3. The purpose is to give meaning to buzzwords, describe how blockchain functions and its restrictions, and provide a wider comprehension of Web3. This includes the issues it aims to solve, the technologies that target these issues, modifications for developers, and the architecture of Web3 apps.
👉 Quick note: This presentation is not meant only for technical people; most of the topics are explained in general terms to give you a broader understanding of how things work. If a topic is more technical, don't worry and continue to the next one.
During the Web 1.0 era, websites were mainly static and owned by companies. There was very little interaction between users, and individuals rarely produced content.
📽️ Presenter notes: In 1989, at CERN in Geneva, Tim Berners-Lee was busy developing the protocols that would become the World Wide Web. His idea was to create open, decentralized protocols that allowed information sharing from anywhere on Earth.
The Web 2.0 period began in 2004 with the emergence of social media platforms. Instead of being read-only, the web evolved to be read-write. Companies not only provided content to users but also began to offer platforms to share user-generated content and engage in user-to-user interactions.
📽️ Presenter notes: Web 2.0 also introduced the advertising-driven revenue model. While users could create content, they didn't own it or benefit from its monetization.
Web3 has become a catch-all term for the vision of a new, better internet. At its core, Web3 uses blockchains, cryptocurrencies, and NFTs to give power back to the users in the form of ownership.
💡 Image note: Transformation of the same logical functionality throughout all versions of the internet. Note that in the Web3 version, you only have one account, and that is your wallet.
💡 Note: “Web1 was read-only, Web2 is read-write, Web3 will be read-write-own”
Example:
In Web 2.0, users create content but do not own it. If I create a video on YouTube, it belongs to Google and I get a share of the revenue.
Here are 5 benefits of using Web3:
Here are 5 limitations of Web3:
💡 “Web3 isn't difficult, but it is different”
Web3 is trying to solve several problems, including ownership of data, identity, and digital assets, and the lack of transparency, security, and trustless transactions in Web2. It aims to provide a decentralized, transparent, and secure internet that gives power back to the users in the form of ownership. Additionally, Web3 is trying to address the issues of technical barriers to entry, education, interoperability, scalability, and accessibility.
Web 2 | Web3 |
---|---|
Twitter can censor any account or tweet | Web3 tweets would be uncensorable because control is decentralized |
Payment service may decide to not allow payments for certain types of work | Web3 payment apps require no personal data and can't prevent payments |
Servers for gig-economy apps could go down and affect worker income | Web3 servers can't go down – they use Ethereum, a decentralized network of 1000s of computers as their backend |
Blockchain technology is a type of computer system where information is stored in blocks that are linked together. Once information is added to a block, it cannot be changed, making it very secure and difficult to hack or manipulate. Blockchains are often used for financial transactions but can also be used for other types of data storage and sharing.
Live demo starts at 7:36.
Ethereum smart contracts are self-executing programs that run on the Ethereum blockchain. They are like traditional contracts, but instead of being enforced by legal means, they are enforced by code. Smart contracts can be used for a variety of purposes, such as managing digital assets, executing complex financial transactions, and creating decentralized applications (dApps). Once a smart contract is deployed, it cannot be modified or deleted, making it a secure and reliable way to automate contractual agreements.
// actual code for calling API
import axios from 'axios'
const axiosClient = axios.create({
baseURL: `https://www.example.com/api/v1`,
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
});
// for list of endpoints will need to use swagger
axiosClient.get('/products')
// or
axiosClient.post('/product', JSON.stringify(data))
import { ethers } from 'ethers'
// setting up external node
const url = 'ADD_YOUR_ETHEREUM_NODE_URL’;
const provider = new ethers.providers.JsonRpcProvider(url);
// setting up contract
const address = 'CONTRACT_ADDRESS_FROM_REMIX';
const abi = [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [],
"name": "getLatestPrice",
"outputs": [
{
"internalType": "int256",
"name": "",
"type": "int256"
}
],
"stateMutability": "view",
"type": "function"
}
];
const contract = new ethers.Contract(address, abi, provider);
contract.getLatestPrice()
.then((result) => {
console.log("$" + result.toNumber() / 100000000);
});
curl "<http://api.etherscan.io/api?module=contract&action=getabi&address=0xe7c29cba93ef8017c7824dd0f25923c38d08065c&format=raw>" > Token.json
// SPDX-License-Identifier: MIT
pragma solidity 0.8.8;
import "./PriceConverter.sol";
error NotOwner();
contract FundMe {
using PriceConverter for uint256;
address[] public funders;
mapping(address => uint256) public addressToAmountPaied;
uint256 public constant MINIMUM_USD = 50 * 1e18;
address public immutable i_owner;
constructor() {
i_owner = msg.sender;
}
function pay() public payable {
require(msg.value.getConversionRate() > MINIMUM_USD, "You've paid less then minimum amount");
funders.push(msg.sender);
addressToAmountPaied[msg.sender] += msg.value;
}
function withdraw() public onlyOwner {
for (uint256 funderIndex = 0; funderIndex < funders.length; funderIndex++) {
address funder = funders[funderIndex];
addressToAmountPaied[funder] = 0;
}
// reset founders array
funders = new address[](0);
(bool callSuccess, ) = payable(msg.sender).call{ value: address(this).balance }("");
require(callSuccess, "Funds where not withdrawen");
}
modifier onlyOwner {
if (msg.sender != i_owner) revert NotOwner();
_;
}
}
💡 “This doesn't mean that all services need to be turned into a dapp. These examples are illustrative of the main differences between Web 2 and Web 3 services”
Step by step walkthrough, of migrating casual Web app to decentralized web app architecture
step 0: Actual Web app architecture
step 1: we exchanged our backend and database for blockchain
step 2: we added external node so we don’t have to store all of the blockchain data on our machine
step 3: we added wallet connectivity so user can sign his blockchain transactions
step 4: we added IPFS that comunicates with our external node so we can store big data on distributed peer to peer network
step 5: now we uploaded our FE on IPFS so we don’t have to commit to centralized Web servers
we also added 3rd party service The Graph that eliminates the need to constantly call to blockchain to retrieve data, also it formats data to GraphQL
Final: last modification will be adding L2 scaling solution like Polygon, this makes user cost for making new transactions at the minimum
What is Web3 and why is it important? | ethereum.org