Web3 Glossary - R & S of Web3
Rollup your sleeves to delve in some web3 infra optimizations and web3 SCAMS!
Gm Folks!
Happy Sunday ya’ll. Let’s keep it a little light this weekend
Today’s newsletters comes with some interesting discussions around web3 infrastructural optimizations and SCAMS in Web3.
Letters for today’s web3 glossary - R, S and T
👉R: Relayer, Rug pull,Rollup
👉S- Sidechain, Smart contract, Sharding, Sandwich attack
Blockchain is still in its infancy and stuck transactions can be a frustrating experience. There’s got to be a solution, right?
There’s not just one but many solutions, let’s start with 👇👇
Relayers💯
As the name suggests, it takes individual orders and organizes them into an order book to simulate the experience of an exchange without actually being one.
Send your meta transactions, the relayer takes care of the rest!
What is a meta txn?🤔🤔
Meta txn = standad txn (from, to value, sign etc) except instead of sending it directly to a blockchain, it’s sent to a third party which takes care of the gas
1️⃣The third party builds a new transaction containing the meta-transaction and sends it to a smart contract proxy👇👇
2️⃣It then checks the validity of the meta-transaction (using sign) before executing it.
P.S. Relayer is the third party here. It’s like hosting an off-chain orderbook.
0x is an example of a popular Ethereum relayer protocol.
You might wonder: if the application can relay the transactions by itself for its users, when and why do we need a relayer?
👉It improves the transaction outcome in the blockchain & also facilitates implementation of gasless transactions.
Example: If you want to send 3 txns, you have to wait till the first 2 txns are processed. Now, the no. of pending transactions for an account is limited by the node (64 in case of Geth). In case of say 3 accounts it can be upto 192. Beyond this limit, the node can arbitrarily delete transactions from its queue.🤯
To overcome these limitations, a relayer can dispatch its meta-txns & send them from multiple accounts. More so, when a txn is stuck on one of the accounts, the relayer can displace it to one of the two remaining accounts and thus keep sending its transactions
How to implement?🤔
Checkout opengsn.org to know more on how to implement relayers!
Ethereum, the most popular blockchain, has seen scaling issues for quite a long time now, with high gas fees due to congestion being the primary pain point. With the increasing cost to use the network, a plethora of scaling solutions have emerged.
Rollups is one of them🥁
Rollups is an infrastructural layer 2 scaling solution for the Ethereum network. Rollups settle the transactions outside of the main Ethereum network but post the transaction data back to the Ethereum network and still derive its security from the Ethereum protocol.
📌The txn is executed off the chain on a rollup specific chain.
📌Next, the batched transaction data is compressed, and sent to the main Etheruem chain.
👉 This reduces the load on the main Ethereum network freeing up the computational power on layer.
There are different ways of approaching this problem from a technical pt of view
📌Zero Knowledge(ZK) & optimistic rollups
Rollups not only help in reducing the fees but also enable redeployment of all the existing Ethereum smart contracts to a rollup with little or no change💯
Cross - chain interoperability in blockchain systems allow for the creation of powerful new products and services that leverage the benefits of multiple blockchain networks working together simultaneously.
Sidechains help mainchains scale & become more interoperable.💯
Sidechain is a parallel blockchain used to offload txns from the mainchain to increase scalability/add other functionality. They’re connected to their parent chain, via a two-way link that allows data & assets to be seamlessly transferred.
Interestingly, the assets are not actually transferred. They are simply locked on the mainnet while the equivalent amount is unlocked in the sidechain.
How does the validation of this imaginary transfer happen?🤔
👉Via a Smart Contract
They ensure that foul play is minimized by enforcing validators on the mainchain & sidechain to act honestly confirming cross-chain txns
📌Once a txn has happened, a smart contract will notify the mainnet - an event has happened.
📌Next, the offchain process will relay the txn info to a smart contract on the sidechain verifying the txn.
📌Post this, funds can be released on the sidechain, facilitating movement of digital assets across both blockchains.
📍This process can occur from the mainchain to the sidechain or vice versa.
eg. Bitcoin’s Liquid_BTC and RSKsmart
Blockchains have been facing the classic ‘trilemma’ of simultaneously achieving scalability, security, and decentralisation since their inception. Adding more nodes helps decongest the blockchain network
BUT... 👀
What do we do about the reduced processing speed? That’s where sharding comes in.🧐
Sharding is a method of separating a network’s nodes out into smaller groups (shards) in an attempt to increase scalability.
Think of them as sub-chains (not sidechains :P)👇👇
Each shard is a mini-blockchain on its own with their own set of nodes and processing power. Thus, sharding helps reduce the required computing power as they’re able to reach consensus on behalf of the entire network, removing the need for every node to process every txn
How sharding works would be a deep dive. Let me know if you’d like to see a thread on that with some cool infographics🚀🚀
👉DotParachains , NEARProtocol , eth2 use sharding
Who wouldn’t agree: Where there’s money, scams follow👀 So is the case with Crypto
Rug pull is a crypto-token based scam
Let’s scratch the surface!🧐🧐
In rug-pulls, the creators of the token create hype, through injecting liquidity into their token, airdropping, and other schemes, and once investors pile in and boost the price of the token to a certain point, the creators pull as much value out of their share of the tokens, leaving their investors with close to nothing.
It’s a DeFi exploit and seemingly common.😬😬
There are different types of rug pulls, some illegal and some unethical. Also there are several clear signs that investors can watch out for, to protect themselves from rug pulls.
Let me know in the comments, if you’d like to learn more on them.🚀🚀
Discussing scams, how can we miss Sandwhich attacks?🤔
In a sandwich attack, a foul trader looks for pending txns on the network of their choice, say Ethereum.
Sandwiching occurs by placing one order right before the trade and one right after it. The attacker front-runs and back-runs simultaneously, with the original pending txn sandwiched in between.
How is the victim affected?
Say Alex (victim) trades a crypto-currency asset X (ex: ETH) to another crypto-asset Y and makes a large purchase.
A bot sniffs out this txn in the mempool and Front-Runs Alex by purchasing asset Y before the large trade is approved.
This purchase raises the price of asset-Y for Alex & increases the slippage🤯
P.S. - Slippage is the difference between the expected price of an order and the price when the order actually executes.
Due to this high purchase of asset Y, its price goes up, and Alex buys Y at at a higher price, post which the attacker sells at a higher price.
This type of attack is most common in DExs and in most cases the attack depends on the slippage tolerance set by the victim
Protocols are trying to incorporate new technologies like ZK-Snarks to help users mask the trade information so that bots can’t identify it.
That’s a wrap for today!
Stay tuned for more on the new vocabulary of the web for next 30 days.💯
It’s a free crash course on the jargons and terminologies in Web3 direct to your email
As ever, thank you for subscribing and reading. It matters. It’s a big deal to me.
And, remember, half-true compliments and feedbacks are always welcome at:
laisha.wadh [at] gmail [dot] com
WAGMI 🚀🚀