Understanding Decentralization the Right Way
A Technical Review
Alperen Bekci
12/19/20243 min read
Introduction: What is Decentralization and Why Does It Matter?
Decentralization is a paradigm in the digital world that enhances individual control, redefines trust, and enables personal empowerment by eliminating intermediaries. While Trilema Wallet aims to offer a fully decentralized structure, certain systems (like passkeys, Google, and Apple Auth) may create the perception of centralization among users. In this article, we delve into how our ERC-4337-based wallet infrastructure works with these authentication processes, how wallets are created, stored, and accessed, and the mechanisms ensuring user balance control, transaction security, and a truly decentralized system.
User Authentication: Interaction of Passkeys and Google/Apple Auth with ERC-4337
Authentication with Passkeys
Passkeys, based on WebAuthn and FIDO2 protocols, enable authentication by generating private keys on user devices. Here’s how this system integrates with our ERC-4337-supported wallets:
Private Key Generation:
The passkey system generates a private key stored solely on the user's device.
This private key is processed and secured in a format compatible with the ERC-4337 account abstraction mechanism.
Authentication Process:
When the user authenticates with a passkey, the private key stored on the device digitally signs a transaction request.
This signed transaction is transmitted directly to the blockchain network, bypassing any central server, ensuring a fully decentralized process.
Integration of Google and Apple Auth
Google Authenticator and Apple’s authentication systems enhance the user experience in our ERC-4337-based wallets as follows:
Seed Key Generation:
A seed key is generated via Google or Apple Auth. This key, stored on the user's device, periodically generates passwords using the TOTP (Time-Based One-Time Password) protocol.
ERC-4337 Compatibility:
Passwords generated by TOTP are sent to the smart contract during user authentication, ensuring wallet access is restricted to the authenticating user.
Decentralization Emphasis:
All authentication processes rely solely on private and seed keys stored on the user's device, maintaining a structure free from central authority intervention.
Transaction Execution with ERC-4337
The ERC-4337 standard utilizes account abstraction to secure and streamline decentralized transactions. Here’s how the technical process unfolds:
Creating a Transaction Request:
Users initiate a transaction through the wallet software, forming an object called a "UserOperation."
This object includes transaction details (e.g., recipient address, amount, gas fees) and a digital signature generated with the user’s private key.
Propagation via Bundler Network:
The transaction is submitted to the blockchain network by a "bundler." The bundler groups multiple UserOperations to optimize transaction validation.
Validation and Confirmation:
Blockchain nodes validate the transaction by verifying the digital signature against the user's private key.
Valid transactions are added to the blockchain, balances are updated, and the transaction history is recorded.
Balance Management and Control
User balances are stored entirely on the blockchain, independent of any central server. The ERC-4337 account abstraction mechanism plays a pivotal role in this process:
Smart Contract Accounts:
User balances are linked to smart contracts tied to wallet addresses. These contracts are accessible only through the user’s private key.
Smart contracts autonomously and securely handle authorization and transaction processes.
Gas Fee Management:
Users can pay gas fees using various token types. The flexibility of ERC-4337 enables automatic deduction of gas fees from wallet balances.
Backup and Recovery:
In case of private key loss, social recovery mechanisms or multisig (multi-signature) configurations ensure user control remains intact.
Viewing Transaction History and Data
Trilema Wallet allows users to view their transaction history in a decentralized manner through the following methods:
Blockchain Queries:
Transaction history is retrieved via real-time blockchain queries. The wallet software communicates directly with blockchain nodes.
Data Security:
User transactions are recorded solely on the blockchain, avoiding the use of centralized databases, ensuring complete user control over transaction history.
Decentralized Naming and Programmability
Trilema Wallet offers mechanisms for user-friendly interactions, such as readable names for blockchain addresses and programmable transaction features:
Trilema Name Service:
Users can replace complex addresses with readable names like "username.eth," managed by a smart contract on the blockchain.
Programmable Payments:
Advanced transactions, such as subscription payments or conditional transfers, are managed through smart contracts.
User Experience:
The wallet interface simplifies technical processes, providing an intuitive user experience while handling complex operations in the background.
Conclusion: The Power of Decentralization
Trilema Wallet combines technologies like passkeys, Google Auth, and ERC-4337 to deliver a user-friendly yet fully decentralized experience. By ensuring user control over balances, authentication processes, and transaction data, the wallet embodies the true essence of decentralization.
Decentralization is not merely a design choice but a fundamental principle for empowering individuals to control their digital assets and identities. Trilema Wallet brings this vision to life with technical excellence. Broader adoption of decentralized infrastructure will enhance user security and reinforce independence in the digital economy.
©2024 Trilema- All rights reserved
Self-Custodial Web3 Wallet Infrastructure
Reach Us
Company