How to build a scalable Dapp
ETHDenver 2023
Agenda
Who is this talk for?
About me
What is a Dapp?
What are the components of a Dapp?
How to deploy the components.
How to design for scale.
Wrapping it up
Link to the slides somewhere on the page. Maybe QR code too
Who is this talk for?
- Anybody building a Dapp
- Somebody that wants to deploy to an EVM chain
About Me
Alex Norell
Add image of face
Infrastructure and Security @ Semiotic Labs
Python Maxi
GitHub Evangelist
What is a Dapp?
- Onchain
- Smart contracts
- Assets
- Data
- Off Chain
- Compute
- Assets
- Data
What are the components of a Dapp?
Frontend
Backend
Smart Contract
Frontend
- UI for App
- Wallet Interface
- Usually a website
- Display data from chain
Backend
- Blockchain Data
- Other Data
- Computation
- Write data to the chain
Smart Contracts
- How your application actually interacts with the chain
- Transactions to your contracts
- Read information from your contract
Which chain should I deploy to?
- Ethereum (Mainnet)
- L2s
- Arbitrum
- Optimism
- Alt-L1
- Polygon
- Avalanche
- BNB Chain
- Gnosis
- Fantom
- Metis
Where do I deploy offchain?
- Hyperscaler
- AWS
- GCP
- Azure
- Scaler
- Linode
- DigitalOcean
- Virtuozzo
- Bare Metal
- In you basement
- In a colocation
Design decisions
- Requirements
- Keep costs reasonable
- Handle all the traffic
- Prevent abuse
- Other
- Sanctions
- Censorship resistance
- Cost
What should go on chain?
Onchain:
- User interactions
- Transfer of ownership
- Material change of state
Offchain:
- Binary blobs
Where do I get my data?
- Subgraphs
- Nodes
- Partners (APIs)
Subgraphs
- GraphQL
- Query events from the blockchain
- Pay for your queries with crypto
- Reliable, but not infallible
Nodes
- What you need them for?
Node Types
- Dedicated
- Shared
- Public
Node Providers
- Chainstack
- Quicknode
- Ankr
- Alchemy
- Datahub
- Blockdaemon
Partners
- Get pre-formatted data directly from APIs
- Accelerate development
- Potentially better data accuracy
Wrapping it up
Odos
- Odos.xyz
- DEX Aggregator
- 6 Chains
- Unique Smart Order Routing
- Just Launched an API
Socials and Slides
- website: alexnorell.com
- github: alexnorell
- twitter: @alexnorell
- ens: alexnorell.eth
- telegram: alexnorell
- slides: ethdenver.alexnorell.com