Avalanche Subnets Custom VMs
Avalanche Subnets Custom VMs
Introduction to Web3.0,
Avalanche, Subnets,
and Customized VMs
Sarnavo Saha Sardar
Dev Advocate @AvalancheDAO
Agenda
1. Introduction
2. Blockchain
3. Cryptocurrency
4. Avalanche
5. Smart Contracts
6. Oracles and Chainlink
7. Avalanche L1 (subnets)
Evolution of the Internet
WEB 1.0 WEB 2.0 WEB 3.0
● Base Protocols ● Private Chats ● Search ● Encryption ● Video ● Bitcoin (2008) ● Blockchain
● Static Web Pages ● Discussion Boards ● Music ● Payments ● Mobile ● Smart Contracts ● Oracles
● Email ● Web Browsers ● Apps ● Social ● Cloud ● Wallets ● Tokens
● Gaming ● Trust Minimized ● Open Source
Protocol Acronym Purpose
Decentralized Architecture
Distributed computational power providers, called nodes,
compete to validate transactions and secure the network
against malicious attacks through lack of dependency on
any oneUsers
participant.
Developers
Researchers
Automated Digital Transaction Ledger
An excel spreadsheet of transactions without manual
data entry or amendment of data after the fact, offering
public transparency and consensus agreement of truth
1 2 3
Energy and computational power are used Cryptocurrency owners pledge their Alternatives to PoW & PoS have been
to solve for cryptographic equations to coins for use in the transaction introduced in recent years as
validate transactions and produce validation process and receive experimentation continues within
cryptocurrency rewards in return cryptocurrency rewards in return the industry.
Blockchain Limitations and Trade-Offs
The benefits of decentralization, distributed consensus and cryptographic encryption security
are only achieved based on certain sacrifices compared to existing mature WEB 2.0 alternatives
Scalability
● Transaction Volumes
● Transaction Speeds (TPS)
● Tamper Proof = Closed End Systems
● Limited External Interaction Possible
Blockchain
Trilemma ● Scalability Issues Currently
Security Decentralization
Cryptocurrency
Types of Cryptocurrencies
Security Tokens
Security tokens are digitally recorded assets that Utility Tokens
function similarly to equities traded on stock Utility tokens are a type of cryptocurrency that
exchanges. Security tokens resemble regular exist within a network. They may be used to pay
stocks and, in many cases, provide equity or a for services, pay network costs, or redeem rewards,
dividend payout to investors. among other things.
1 2 3
Permissionless value transfer Digital voting rights to facilitate Digital Provenance for exclusive
eliminating the need for any decentralized democratic decision ownership / property rights of real
intermediaries making and help shape the future of world and digital assets.
the project
Cryptocurrency Evolution Timeline
From Bitcoin’s inception to the recent NFT Boom, it’s been an exciting yet
volatile process of experimentation and innovation over the last 14 years.
2011 - Altcoin Forks Begin 2017 - ICO Boom 2021 - NFT Boom
Namecoin, Litecoin, Token sales become an Increased DeFi adoption
Monero, & Zcash among alternative crowd catalyzes further
others copy Bitcoin code financing structure to raise exploration of creator and
while amending certain start-up funding amidst a community use cases
features to differentiate & new wave of blockchain
experiment use cases
Credits: https://snowpeer.io
Avalanche Primary Network
Primary Network is a special Subnet which utilizes the Snowman Consensus.
It runs three different blockchains: X, P and C-chain
X-Chain: native chain meant for creating and trading assets (ANTs), runs an
instance of Avalanche Virtual Machine.
→ Higher throughput
→ Lower Fees
→ Least Time to Finalize transactions
What is a Subnet?
Subnet is essentially a subset of Avalanche
validators working together to achieve
consensus on the state of one or more
blockchains.
Subnet B Subnet 2
Subnet C Subnet 3
Using Avalanche CLI, anyone can deploy Using AvaCloud, you can get your test
your subnet in under 3 minutes. Subnet up and running in under 1 minute!
Just select the virtual machine (EVM or a All you need is an AvaCloud account and
custom VM) and include the precompiles. Core Wallet extension pre-installed.
Deploying Subnets Locally Results
If all works as expected, the command output should
look something like this:
Install Core Wallet Extension > avalanche subnet deploy mySubnet
✔ Local Network
https://chromewebstore.google.com/detail/core-crypto-w Deploying [mySubnet] to Local Network
Installing subnet-evm-v0.4.3...
allet-nft-ex/agoakfejjabomempkjlepdflaleeobhb?hl=en subnet-evm-v0.4.3 installation successful
Backend controller started, pid: 93928, output at:
/Users/subnet-developer/.avalanche-cli/runs/server_20221122_173138/avalanche-cli-backend
Install Docker and Dev-Container Extension in VScode Installing avalanchego-v1.9.3...
avalanchego-v1.9.3 installation successful
VMs ready.
Starting network...
..................
Clone this Repo Blockchain has been deployed. Wait until network acknowledges...
......
https://github.com/ava-labs/avalanche-starter-kit Network ready to use. Local network node endpoints:
+-------+----------+------------------------------------------------------------------------------------+
| NODE | VM | URL |
+-------+----------+------------------------------------------------------------------------------------+
In the following commands, make sure to substitute the | node2 | mySubnet |
avalanche subnet deploy <subnetName> Browser Extension connection details (any node URL from above works):
RPC URL:
--local http://127.0.0.1:9650/ext/bc/SPqou41AALqxDquEycNYuTJmRvZYbfoV9DYApDJVXKXuwVFPz/rpc
Funded address: 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC with 1000000 (10^18) - private key:
56289e99c94b6912bfc12adc093c9b51124f0dc54ac7a766b2bc5ccf558d8027
Network name: mySubnet
Chain ID: 54325
Currency Symbol: TUTORIAL
Import Your Wallet in Core
Add Your Subnet
Reward Time
Tweet about your learning
1. Follow @AvaxDAO_