The Graph Introduction thread.

Storing data on the blockchain has its advantages, but also disadvantages.

The Graph can be a solution for indexing and querying data on the blockchain efficiently.

Let's introduce The Graph with this thread.

web3 threads - The Graph
Table of Contents

Definition
Examples
Bored Ape Yacht Club basic ops
BAYC advanced ops
Getting data is not easy
Home-made solution
Home-made solution problems
Indexing blockchain data is hard
The Graph solution
GitHub
How The Graph Works
Flow
Conclusion
💯 days of Web3
Support
Definition

"The Graph" is a decentralized protocol for blockchains, starting with Ethereum.

The Graph core functionalities are:
- indexing data
- querying data

It makes it let you query data that it would be difficult to query directly.
Examples

"Uniswap" and "Bored Ape Yacht Club" (BAYC) projects, for example, store their data on the Ethereum blockchain.

Reading data and querying data on these big projects can be very hard. ImageImage
BAYC basic operations

Let's take the Bored Ape Yacht Club (BAYC).

Some basic operations are possible

We can get:
- the owner of a certain Ape
- the content URI of an Ape based on their ID
- the total supply

This is because they are coded directly into the smart contract.
BAYC advanced operations

Example of advanced operations:
- advanced filtering.
- relationships.
- aggregation.
- search.

In these cases, which are still not rare cases, it's not possible to query and filter this information directly with the contract.
Getting the data is not easy

To get the data, you have to:
- process every single transfer event ever emitted.
- read metadata from IPFS using Token ID and IPFS hash.
- aggregate it.

Even for these relatively simple things, it would take a lot of time to do this in a browser
Home-made solution

To solve the problem of getting data, you can:
- build your own server.
- process the transactions in the server.
- save them to a DB.
- build an API endpoint on top of it to query the data.
Home-made solution problems

But the home-made solution has some cons:
- it's resource-intensive
- it needs maintenance
- it presents a single point of failure
- it breaks security decentralization properties.
Indexing blockchain data is hard.

It's not enough.

Some Blockchain properties complicate this process even more:
- finality
- chain reorganizations
- uncled blocks

In this case, it's not just about time but also about the complexity of the operation.
The Graph solution

The Graph solves this with a decentralized protocol.

It allows efficient querying of blockchain data.

These APIs (subgraphs) can be queried with standard GraphQL API.

There is a hosted service as well as a decentralized protocol with the same capabilities.
How The Graph Works

The Graph indexes data using subgraph descriptions.

It defines:
- smart contracts of interest
- important events
- how to map event data to data (stored in a DB)
Flow

1️⃣Dapp adds transactions
2️⃣Smart contract emits events
3️⃣Graph Node scans for new blocks/subgraph data
4️⃣Graph Node finds subgraph events & runs the provided mapping handlers
5️⃣Dapp queries Graph Node for data, using GraphQL endpoint and displays data

src: The Graph docs Image
Conclusion

The Graph is an indexing protocol for querying networks (like Ethereum and IPFS).

Everyone can build/publish open APIs (subgraphs), making data easily accessible.

It looks promising and probably needs more attention. It is a big project.
💯 days of Web3

I am on the challenge of posting on Web3 content every day for 100 days.

Day 76

Here is the GitHub repository with all the Tweets, day by day

github.com/FrancescoXX/10…
The Graph GitHub Repository

github.com/graphprotocol/…
Support

if you enjoyed this thread, follow @FrancescoCiull4 and retweet the tweet below. thank you.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Francesco Ciulla

Francesco Ciulla Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @FrancescoCiull4

Mar 5
Some tips for being active as a Developer. A thread ↓
Body and mind are connected

If you are physically active, this will have an impact on your mental activities, such as writing code or thinking about how to solve a bug.

Mind and body are closely connected and one influences the other.

The Dev Stereotype

There is the stereotype of the developer who stays in front of the computer all day.

But it doesn't have to be that way.

You can be a developer and also stay fit, dedicating time to training constantly every day.

Read 11 tweets
Mar 5
OpenZeppelin thread.

The first time I heard the word "Zeppelin" I thought of something similar to what is in Warcraft 3 (or Warcraft 2!).

But it has nothing to do with that.

it's an Open Source project that helps you to create your smart contracts in a secure and easy way.

web3 threads - OpenZeppelin...
Table of Contents

- What is OpenZeppelin
- Pillars
- WebSite
- Docs
- Guides
- Jobs
- Ethernaut
- GitHub
- Additional resources
- 💯days of Web3

What is OpenZeppelin

On their website, their own definition is
"The standard for secure blockchain applications"

In simpler words:

OpenZeppelin is a platform that helps you to build secure decentralized Apps.

For example, it can provide ERC20 implementation for your apps Image
Read 13 tweets
Feb 27
NFT introduction thread.

NFTs are not just jpegs.

No, It is not enough to right-click and save it on your PC.

A thread from valid sources to have a clearer idea around them.

web3 threads. NFT Introduction. Mona Lisa vectorized
Table of Contents

Intro
NFT: Non-Fungible Token
NFT key concepts
Fungible Items
Internet of assets
NFTs ability
NFT examples
Ownership
Special Properties
What can you do if you OWN an NFT
What can you do if you CREATE an NFT
NFT Royalties
NFT Scarcity
NFT standard
The end?

Intro

Digital artists are changing their lives change thanks to huge crypto sales.

Celebrities are spotting new opportunities to connect with fans.

But NFTs are way more: they can be used to represent ownership of ANY unique asset.
Read 21 tweets
Feb 26
🟣 11 Twitter Spaces TIPS thread.

✏️Have a Topic
🧑‍🤝‍🧑Guests
📝Have a structure
⏰Have an idea of the duration
🗓️Regular Spaces
🙋‍♀️Make an introduction
🛑Check profiles before inviting
⛔Moderate the Space
📌Pin a tweet for the questions
👋Don't just say bye space
😁Enjoy

✏️Have a topic

Twitter spaces should have a title.

Unless you intentionally want a very random Twitter space, avoid titles like "let's talk, Hi I am XYZ, let's just make a space", "chatting".

Give people a reason to join your Space.
🧑‍🤝‍🧑Guests

Having guests related to the topic can really boost up your Twitter Space.

They would also hopefully help you to promote your Space, which is a great plus especially if you haven't already a huge account
Read 13 tweets
Feb 26
Ethereum Sidechains thread.

A Sidechain is an independent blockchain, designed to be compatible with the Ethereum blockchain.

They can use a different Consensus mechanism and they have Pros and Cons.

Web3 threads. Ethereum Sidechains. An image of a big Chain a
Table of Contents

Definition
Sidechain responsibilities
How do sidechains work?
Security
Examples
Matic
Skale
POA Network
Gnosis
Consensus Mechanism
Proof-of-Authority
Proof-of-Stake
Sidechains Pros
Sidechains Cons
Interoperability

Definition

A sidechain is another blockchain that runs in parallel to Ethereum Mainnet.

It operates independently from Ethereum.

Its goal is to improve the Ethereum blockchain but be compatible with that.
Read 19 tweets
Feb 25
🅰Algorand Blockchain thread.

The Algorand Blockchain is a blockchain protocol created by Silvio Micali

He is an Italian professor at MIT, Turing award winner, and co-inventor of Zero-Knowledge proofs.

Let's see its key concepts in 2 minutes.

the Algorand blockchain
Table of Contents:

- Definition
- Origins
- Research
- Consensus Algorithm
- Phase 1: Block Proposal
- Phase 2: Soft Vote
- Phase 3: Vote certification
- Smart Contracts
- TEAL
- Pyteal
- Block Explorer
- On GitHub
- To get Started

Definition

Algorand is a Layer 1 blockchain protocol that aims to solve the blockchain trilemma.

The Algorand platform has a native token (ALGO) and supports smart contracts.

The consensus algorithm is based on:
- pure proof of stake
- a Byzantine agreement protocol.
Read 17 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(