Bxpana pfp
Bxpana
@bxpana
This Week I Learned (TWIL): Signature Standards in Ethereum and Diamond Proxies Let’s dive into two critical EIPs: EIP-191 and EIP-712. They play a key role in making Ethereum signatures more secure, readable, and versatile. πŸ‘‡
1 reply
0 recast
4 reactions

Bxpana pfp
Bxpana
@bxpana
Why do we need these standards? βœ… Human-readable messages: EIP-712 shows structured, user-friendly signing prompts. βœ… Security: EIP-712 prevents replay attacks. βœ… Sponsored transactions: EIP-191 enables sending transactions on behalf of users.
1 reply
0 recast
1 reaction

Bxpana pfp
Bxpana
@bxpana
EIP-191: Basic Structure πŸ“œ Format: 0x19<1 byte version><version specific data><data to sign> Examples of <1 byte version>: πŸ”Ή 0x00: Data with a validator πŸ”Ή 0x01: Structured data (EIP-712-compatible) πŸ”Ή 0x45: Personal_sign
1 reply
0 recast
2 reactions

Bxpana pfp
Bxpana
@bxpana
EIP-712: Structured Data Signing EIP-712 improves traditional message signing by: πŸ–ΌοΈ Adding structure for easier message readability. πŸ›‘οΈ Defining fields explicitly to prevent signing unintended data. Let’s break it down! πŸ‘‡
1 reply
0 recast
2 reactions

Bxpana pfp
Bxpana
@bxpana
Key Components of EIP-712 1️⃣ Domain Separator: It encodes metadata like app name, version, chain ID, and contract address. It ensures the signature is valid only within its intended domain.
1 reply
0 recast
2 reactions

Bxpana pfp
Bxpana
@bxpana
2️⃣ Hashing the Message: EIP-712 hashes the structured message to ensure integrity and prevent tampering.
1 reply
0 recast
0 reaction

Bxpana pfp
Bxpana
@bxpana
Finally, combine everything: The signature includes: 0x19 0x01 <domainSeparator> <hashStruct(message)> This ensures: πŸ”’ Security πŸ” Transparency for users EIP-712 = Better UX + Stronger Security πŸš€
1 reply
0 recast
0 reaction

Bxpana pfp
Bxpana
@bxpana
Diamond Proxy Architecture Another gem from this week: Diamonds! πŸ’Ž They enable modular, upgradeable contracts via EIP-2535. Think of it as: 🏨 A hotel where: β€’ Front desk = Diamond proxy β€’ Services = Facets β€’ Shared resources = Shared storage
1 reply
0 recast
0 reaction

Bxpana pfp
Bxpana
@bxpana
Why Diamonds? πŸ’‘ Modular: Break contracts into smaller, manageable parts. πŸ”„ Upgradeable: Update facets without changing the contract address. πŸ”— Shared: Centralized storage for all facets. Smart contract engineering at its best! πŸ€–
1 reply
0 recast
0 reaction

Bxpana pfp
Bxpana
@bxpana
That’s a wrap for this week! πŸ› οΈ Thanks as always to @cyfrin
0 reply
0 recast
0 reaction