A blockchain is a distributed ledger maintained by a network of computers called nodes that operate in a peer-to-peer fashion. Instead of relying on a central intermediary, thousands of nodes record transactions by trustlessly propagating information to each other; this structural element is central to Web3’s promise of decentralization.
The nodes in the network must be in sync regarding the current state of the blockchain if it is to provide accurate and reliable results to users. Extreme difficulty arises in a P2P network in this regard because nodes in the network don’t receive updates simultaneously.
For the simple reason that they were giving their users contradictory information, a popular NFT team lost tens of thousands of subscribers.
When a user interacts with a dApp and receives true and reliable information, we say that the dApp is accurate.
Web2’s centralized systems make addressing accuracy straightforward by limiting it to a single point of data entry. However, the Web3 distributed system introduces a plethora of novel and difficult problems:
Challenges in Implementation
Coordination issues in networks
Problems arise in ensuring that even the most distant network nodes receive updates (it literally takes longer for information to reach nodes further away in a network)
All of these problems can reduce accuracy across a network of nodes and lead to serving up shattered data, customers being lost, spending a lot of resources correcting an issue that happened in the past.
Let’s take an example. Say Alex is interested in joining a DAO and learns that he must first acquire their token:
While using a DEX, Alex inquires, “DAO token still available?”
Alex’s request is sent to Node A by the DEX’s underlying infrastructure provider.
The DEX replied, “Yes, tokens are still available,” via Node A.
The request is sent to Node B by the DEX’s underlying infrastructure provider.
When Alex tries to make a purchase on the DEX using Node B, he receives the message “Transaction failed.”
Even though Alex double-checked that the token was still available, the information returned by Node A was out of date because the DEX was using a load-balancing infrastructure provider (a very common web3 scaling mechanism).
This highlights the central point: information from a single node, which is where information always comes from when using a load balancer, cannot be relied upon at any given time.
Your transaction (and possibly subsequent transactions) may fail or behave unexpectedly if that node responds to your request, as it may not have the most up-to-date information.
Here is another scenario in which something could go wrong:
User request: “Who is the owner of this NFT?”
User request: “How many NFTs Alex owns?”
To what end did this occur? When using a load balancer-reliant architecture, the state of smart contracts and the resulting behavior of their execution will vary from node to node.
Connecting your dApp to the blockchain can be done in a variety of ways, each with their own pros and cons. To top your list of requirements for a service provider, make sure they can reliably deliver accurate results.