Skip to main content

8 posts tagged with "Engineering"

Engineering insights and technical deep dives

View all tags

DeFi Automation Agent Architecture: Building Autonomous Financial Systems

· 13 min read
Dora Noda
Software Engineer

By 2026, 60% of crypto wallets are expected to integrate agentic AI for portfolio management, transaction monitoring, and security—marking a fundamental shift from manual DeFi strategies to autonomous financial systems. While human traders sleep, AI agents now execute millions in rebalancing operations, defend against liquidations worth hundreds of millions daily, and optimize yields across dozens of protocols simultaneously. This isn't speculative futurism—it's production infrastructure reshaping how value flows through decentralized finance.

The Rise of Autonomous DeFi Agents

The transformation from passive yield farming to active agent orchestration represents DeFi's maturation from tools requiring constant human oversight to self-managing financial systems. Traditional DeFi participation demanded users manually claim rewards, monitor collateral ratios, rebalance portfolios, and track opportunities across fragmented protocols—a workflow that excluded most potential participants due to time constraints and technical complexity.

Autonomous agents solve this execution gap by operating as 24/7 orchestration layers that monitor markets, manage risk, and execute on-chain actions without continuous human involvement. Data from Coinglass regularly shows hundreds of millions of dollars in forced liquidations occurring over short timeframes during market volatility, underscoring the limitations of manual or delayed execution.

DeFAI—the integration of autonomous AI agents within decentralized finance—enables systems that evaluate multiple risk signals simultaneously rather than reacting to isolated price movements. When conditions change, such as rising liquidation risk or liquidity imbalances, agents automatically rebalance positions, adjust collateral ratios, or reduce exposure in real time.

Auto-Compounding Architecture: From Manual Farming to Autonomous Vaults

Yearn Finance pioneered the concept of auto-compounding yields via its yVaults, where assets continuously generate returns without manual claiming and restaking by farmers. This architectural innovation shifted DeFi from labor-intensive reward harvesting to "set and forget" strategies that compound returns programmatically.

How Auto-Compounding Works

Auto-compounders automatically harvest yield farming rewards and reinvest them into the same position, compounding returns without manual claiming and staking. Platforms like Beefy Finance, Yearn, and Convex provide auto-compounding vaults that execute this cycle—sometimes multiple times daily—maximizing effective APY through frequent reinvestment.

Beefy Finance focuses on multi-chain auto-compounding with frequent reinvestment of rewards. In 2026, Beefy holds the title for the most extensive multi-chain footprint, serving as the go-to platform for users on emerging chains like Linea, Canto, or Base who want to automate rewards without manual harvesting. Beefy's recent integration of Brevis ZK-proofs allows users to cryptographically verify that vaults are executing the promised strategies—addressing a critical trust gap in autonomous systems.

Yearn's V3 vaults represent the evolution toward modular, composable yield infrastructure. Using the ERC-4626 token standard, Yearn V3 vaults function as "money legos" that other protocols can easily plug into. Developers called "Strategists" write custom code that the protocol scales, while Yearn's focus remains on depth and security over breadth.

AI Agents for Yield Optimization

By 2026, AI agents like ARMA continuously analyze market conditions across protocols including Aave, Morpho, Compound, and Moonwell, automatically reallocating funds to the highest-yielding pools. Instead of rebalancing weekly or monthly like traditional ETFs, DeFi's AI systems can rebalance multiple times per day based on real-time data analysis.

Token Metrics offers AI-managed indices specifically focused on DeFi sectors, providing diversified exposure to leading protocols while automatically rebalancing based on market conditions. This eliminates the need for constant manual rebalancing while leveraging machine learning and real-time data analysis to optimize asset allocation and mitigate risks.

Portfolio Rebalancing: Intelligent Asset Allocation

Portfolio rebalancing agents address drift—the natural tendency of asset allocations to deviate from target weights as market prices fluctuate. Traditional portfolios rebalance quarterly or monthly, but autonomous DeFi agents can maintain target allocations continuously.

Multi-Signal Evaluation

Autonomous agents evaluate multiple signals simultaneously, including:

  • Liquidity depth across decentralized exchanges and AMMs
  • Collateral health in lending protocols
  • Funding rates in perpetual markets
  • Cross-chain conditions affecting bridge security and costs

By processing these inputs in real time, agents adapt their behavior dynamically within predefined policy constraints. When volatility spikes or liquidity thins, agents can automatically reduce exposure, shift to stablecoins, or exit risky positions before cascading liquidations occur.

Threshold-Based Rebalancing

Rather than rebalancing on fixed schedules, intelligent agents use threshold-based triggers. If an asset's weight deviates by more than a specified percentage (e.g., 5%) from its target, the agent initiates a rebalancing trade. This approach minimizes transaction costs while maintaining portfolio alignment.

Gas fee optimization forms a critical component of rebalancing architecture. ML models embedded in modern agents predict optimal execution times based on network congestion patterns, potentially saving significant costs on high-frequency rebalancing operations.

Liquidation Defense: Real-Time Collateral Management

Liquidations represent one of DeFi's highest-stakes automation challenges. When collateral ratios fall below protocol thresholds, positions are forcibly closed—often with significant penalties. Autonomous agents provide the 24/7 vigilance required to defend against this risk.

Proactive Risk Monitoring

AI-powered risk management systems run continuously on on-chain and off-chain data sources, executing:

  • Collateral ratio monitoring across all lending positions
  • Liquidity pool optimization to ensure adequate depth for exits
  • Abnormal transaction behavior detection flagging potential exploits
  • Autonomous treasury management for decentralized organizations

Rather than waiting for collateral ratios to approach danger zones, agents maintain safety buffers by topping up collateral when ratios trend downward or partially closing positions to reduce exposure. This proactive approach prevents liquidations rather than reacting to them.

Multi-Protocol Defense Strategies

Sophisticated agents coordinate across multiple protocols to optimize collateral efficiency. For example, an agent might:

  1. Monitor a user's collateral position on Aave
  2. Detect declining collateral ratio due to asset price movement
  3. Execute a flash loan to temporarily boost collateral
  4. Rebalance the underlying assets to more stable compositions
  5. Repay the flash loan—all within a single transaction

This level of atomic, cross-protocol coordination is impossible for human operators but routine for autonomous agents with access to DeFi's composable infrastructure.

AI/ML Optimization Techniques

The intelligence layer powering DeFi automation agents relies on advanced machine learning techniques adapted for blockchain environments.

Fraud Detection and Anomaly Identification

Different machine learning methods are being employed for identifying fraud accounts interacting with DeFi, including:

  • Deep Neural Networks for pattern recognition in transaction flows
  • XGBoost, LightGBM, and CatBoost achieving test accuracies between 95.83% and 96.46% for detecting suspicious Ethereum wallets
  • Fine-tuned Large Language Models for analyzing on-chain behavior and smart contract interactions

AI technology reduces miner extractable value (MEV) and provides instantaneous anomaly detection that can clamp down on suspicious activity before exploits escalate. This real-time fraud detection capability is essential for agents managing significant capital autonomously.

Zero-Knowledge Machine Learning (ZK-ML)

Zero-Knowledge Machine Learning frameworks represent a breakthrough for privacy-preserving agent operations. ZK-ML allows AI agents to generate cryptographic proofs that their risk calculations were performed correctly—without exposing sensitive user-level data or proprietary model logic.

This capability addresses a fundamental tension in DeFi automation: users want autonomous agents to manage their assets intelligently, but don't want to reveal their holdings, strategies, or risk parameters to competitors or attackers. ZK-ML enables verifiable computation while preserving confidentiality.

Cross-Chain Generalizability Challenges

While AI/ML techniques show impressive results on single chains, cross-chain generalizability remains limited. Data limitations such as short asset histories and class imbalance constrain model generalizability across different blockchain environments. Agents trained primarily on Ethereum data may underperform when deployed to Solana, Aptos, or other ecosystems with different transaction models and risk profiles.

Five dominant AI application domains in DeFi include fraud detection, smart contract security, market prediction, credit risk assessment, and decentralized governance. Successful agents increasingly employ ensemble methods that combine specialized models for each domain rather than relying on single generalized models.

Wallet Integration Patterns: ERC-8004 and Agent Identity

For autonomous agents to execute DeFi strategies, they require secure wallet infrastructure with cryptographic keys, transaction signing capabilities, and on-chain identity. The ERC-8004 standard addresses these requirements by establishing a framework for trustless agent discovery and interaction.

The ERC-8004 Standard

ERC-8004 is a proposed Ethereum standard designed to address trust gaps by establishing lightweight on-chain registries that enable autonomous agents to discover each other, build verifiable reputations, and collaborate securely. The standard consists of three core components:

  1. Identity Registry: A minimal on-chain handle based on ERC-721 with URIStorage extension that resolves to an agent's registration file, providing every agent with a portable, censorship-resistant identifier.

  2. Reputation Registry: A standard interface for posting and fetching feedback signals, enabling agents to build track records and users to evaluate agent reliability before delegation.

  3. Validation Registry: Generic hooks for requesting and recording independent validator checks, while on-chain pointers and hashes cannot be deleted, ensuring audit trail integrity.

Wallet Compatibility

Since the agent identity is a standard ERC-721 NFT, any wallet that supports NFTs—including MetaMask, Trust Wallet, and Ledger—can hold it. This compatibility enables users to manage agent identities using familiar interfaces while maintaining custody over their agents' capabilities.

Trusted Execution Environments (TEEs)

Modern agent architectures leverage Trusted Execution Environments for secure key management and execution. Platforms like EigenCloud and Phala Network enable agents to operate inside encrypted "black boxes" (enclaves) where even if a hacker gets server access, they can't read RAM or extract wallet private keys.

ROFL (Runtime OFf-chain Logic) provides decentralized key management out of the box—essential for any agent that needs wallet functionality—and a decentralized compute marketplace with granular control over who runs your agent and under what policies.

Real-World Implementations

Uniswap AI Agent Skills

On February 21, 2026, Uniswap Labs released seven open-source "skills" giving AI agents structured, command-based access to core protocol functions:

  • v4-security-foundations: Security framework for agent interactions
  • configurator: Dynamic configuration management
  • deployer: Automated pool deployment
  • viem-integration: Web3 library integration layer
  • swap-integration: Programmatic swap execution
  • liquidity-planner: Optimal liquidity provision strategies
  • swap-planner: Route optimization across pool types

This infrastructure enables autonomous agents managing DeFi positions to discover and hire specialized strategy agents through the Identity Registry, creating markets for agent capabilities and enabling modular, composable automation strategies.

Token Metrics On-Chain Trading

In March 2026, Token Metrics launched integrated on-chain trading, enabling users to research DeFi protocols using AI ratings and execute trades directly on the platform through multi-chain swaps. This integration demonstrates the convergence of analytical AI (evaluating opportunities) and execution AI (implementing strategies) within unified platforms.

Security and Trust Considerations

The promise of autonomous DeFi agents comes with significant security responsibilities. Agents controlling wallets with substantial capital present attractive targets for attackers, and bugs in agent logic can lead to catastrophic losses without human oversight to intervene.

Attack Vectors

Key security concerns include:

  • Private key compromise: If an agent's keys are stolen, attackers gain full control over managed assets
  • Logic exploitation: Bugs in agent decision-making code can be exploited to drain funds
  • Oracle manipulation: Agents relying on price feeds can be tricked by flash loan attacks or oracle exploits
  • Smart contract risks: Interactions with vulnerable protocols expose agents to indirect attack vectors

Security Best Practices

Robust agent architectures implement multiple defensive layers:

  1. Hardware Security Modules (HSMs) or Trusted Execution Environments for key storage
  2. Multi-signature requirements for large transactions
  3. Spending limits and rate limiting to contain damage from compromised agents
  4. Formal verification of agent logic for critical decision pathways
  5. Real-time monitoring with automatic circuit breakers that pause operations when anomalies are detected
  6. Progressive decentralization through governance mechanisms that allow human override in edge cases

The combination of ERC-8004 and ROFL enables developers to build verifiable, cross-chain autonomous agents with cryptographic guarantees about their execution environment, laying the groundwork for trust-minimized automation across DeFi, trading, gaming, and beyond.

The Infrastructure Gap

Despite rapid progress, significant infrastructure gaps remain between AI agent capabilities and blockchain tooling requirements. Agents need reliable access to:

  • Real-time data feeds across multiple chains
  • Gas price oracles for optimizing transaction timing
  • Liquidity depth information for executing large orders without slippage
  • Protocol documentation in machine-readable formats
  • Cross-chain messaging protocols for coordinating multi-chain strategies

BlockEden.xyz provides enterprise-grade RPC infrastructure for DeFi agents operating across Ethereum, Solana, Aptos, Sui, and other major chains. Reliable, low-latency blockchain access forms the foundation for autonomous agents that must react to market conditions in real time. Explore our API marketplace for multi-chain infrastructure designed for high-frequency automation.

Conclusion: From Tools to Actors

The evolution from DeFi as a set of tools requiring human operation to DeFi as an autonomous ecosystem populated by intelligent agents represents a fundamental architectural shift. Auto-compounding vaults, portfolio rebalancing systems, liquidation defense mechanisms, and fraud detection networks increasingly operate with minimal human oversight—not because humans are excluded, but because automation handles routine operations more effectively.

The infrastructure maturing in 2026—ERC-8004 agent identity, ZK-ML verification, TEE execution environments, protocol-native agent skills—establishes the foundation for progressively more sophisticated autonomous financial systems. As these building blocks become standardized and interoperable, the complexity of DeFi strategies accessible to average users will increase dramatically.

The question is no longer whether AI agents will manage DeFi portfolios, but how quickly the infrastructure gap closes and what new financial primitives become possible when intelligence and automation combine with blockchain's programmable trust.

Sources

Web3 DevEx Toolchain Innovation

· 4 min read
Dora Noda
Software Engineer

Here's a consolidated summary of the report on Web3 Developer Experience (DevEx) innovations.

Executive Summary

The Web3 developer experience has significantly advanced in 2024-2025, driven by innovations in programming languages, toolchains, and deployment infrastructure. Developers are reporting higher productivity and satisfaction due to faster tools, safer languages, and streamlined workflows. This summary consolidates findings on five key toolchains (Solidity, Move, Sway, Foundry, and Cairo 1.0) and two major trends: “one-click” rollup deployment and smart contract hot-reloading.


Comparison of Web3 Developer Toolchains

Each toolchain offers distinct advantages, catering to different ecosystems and development philosophies.

  • Solidity (EVM): Remains the most dominant language due to its massive ecosystem, extensive libraries (e.g., OpenZeppelin), and mature frameworks like Hardhat and Foundry. While it lacks native features like macros, its widespread adoption and strong community support make it the default choice for Ethereum and most EVM-compatible L2s.
  • Move (Aptos/Sui): Prioritizes safety and formal verification. Its resource-based model and the Move Prover tool help prevent common bugs like reentrancy by design. This makes it ideal for high-security financial applications, though its ecosystem is smaller and centered on the Aptos and Sui blockchains.
  • Sway (FuelVM): Designed for maximum developer productivity by allowing developers to write contracts, scripts, and tests in a single Rust-like language. It leverages the high-throughput, UTXO-based architecture of the Fuel Virtual Machine, making it a powerful choice for performance-intensive applications on the Fuel network.
  • Foundry (EVM Toolkit): A transformative toolkit for Solidity that has revolutionized EVM development. It offers extremely fast compilation and testing, allowing developers to write tests directly in Solidity. Features like fuzz testing, mainnet forking, and "cheatcodes" have made it the primary choice for over half of Ethereum developers.
  • Cairo 1.0 (Starknet): Represents a major DevEx improvement for the Starknet ecosystem. The transition to a high-level, Rust-inspired syntax and modern tooling (like the Scarb package manager and Starknet Foundry) has made developing for ZK-rollups significantly faster and more intuitive. While some tools like debuggers are still maturing, developer satisfaction has soared.

Key DevEx Innovations

Two major trends are changing how developers build and deploy decentralized applications.

"One-Click" Rollup Deployment

Launching a custom blockchain (L2/appchain) has become radically simpler.

  • Foundation: Frameworks like Optimism’s OP Stack provide a modular, open-source blueprint for building rollups.
  • Platforms: Services like Caldera and Conduit have created Rollup-as-a-Service (RaaS) platforms. They offer web dashboards that allow developers to deploy a customized mainnet or testnet rollup in minutes, with minimal blockchain engineering expertise.
  • Impact: This enables rapid experimentation, lowers the barrier to creating app-specific chains, and simplifies DevOps, allowing teams to focus on their application instead of infrastructure.

Hot-Reloading for Smart Contracts

This innovation brings the instant feedback loop of modern web development to the blockchain space.

  • Concept: Tools like Scaffold-ETH 2 automate the development cycle. When a developer saves a change to a smart contract, the tool automatically recompiles, redeploys to a local network, and updates the front-end to reflect the new logic.
  • Impact: Hot-reloading eliminates repetitive manual steps and dramatically shortens the iteration loop. This makes the development process more engaging, lowers the learning curve for new developers, and encourages frequent testing, leading to higher-quality code.

Conclusion

The Web3 development landscape is maturing at a rapid pace. The convergence of safer languages, faster tooling like Foundry, and simplified infrastructure deployment via RaaS platforms is closing the gap between blockchain and traditional software development. These DevEx improvements are as critical as protocol-level innovations, as they empower developers to build more complex and secure applications faster. This, in turn, fuels the growth and adoption of the entire blockchain ecosystem.

Sources:

  • Solidity Developer Survey 2024 – Soliditylang (2025)
  • Moncayo Labs on Aptos Move vs Solidity (2024)
  • Aptos Move Prover intro – Monethic (2025)
  • Fuel Labs – Fuel & Sway Documentation (2024); Fuel Book (2024)
  • Spearmanrigoberto – Foundry vs Hardhat (2023)
  • Medium (Rosario Borgesi) – Building Dapps with Scaffold-ETH 2 (2024)
  • Starknet/Cairo developer survey – Cairo-lang.org (2024)
  • Starknet Dev Updates – Starknet.io (2024–2025)
  • Solidity forum – Macro preprocessor discussion (2023)
  • Optimism OP Stack overview – CoinDesk (2025)
  • Caldera rollup platform overview – Medium (2024)
  • Conduit platform recap – Conduit Blog (2025)
  • Blockchain DevEx literature review – arXiv (2025)

297k TPS! Sui Network's Impressive Performance Update: A Look at Throughput and Time to Finality

· 3 min read
Dora Noda
Software Engineer

The Sui Foundation recently conducted a series of tests to determine the current peak throughput and time to finality for various workloads on the Sui network. A year after its announcement, the Sui network has made significant strides in performance, becoming a promising decentralized protocol for the future.

Key Findings

  • The Sui network, consisting of 100 globally distributed validators, achieved peak throughput ranging from 10,871 TPS to 297,000 TPS on different workloads.
  • Sui's time to finality is approximately 480 milliseconds, providing rapid transaction confirmations.

Performance Evaluation

To measure the performance of the Sui protocol, the foundation used a globally-distributed setup that closely mirrors the mainnet in terms of hardware configurations, number of validators, geographic distribution, and voting power distribution. The tests were conducted using 100 validators, 24-core AMD hardware, 256GB memory, and 25Gbps NIC.

Measuring Throughput with Programmable Transaction Blocks (PTB)

Sui's core developer primitive, PTB, allows for a complex and composable sequence of transactions. Chained transactions in a PTB can execute and fail atomically, providing increased efficiency and expressivity. Each PTB can support up to 1024 transactions, enabling Sui to handle large workloads and reduce transaction fees for users.

The Challenge of Measuring Throughput

Transactions Per Second (TPS) is a commonly used metric to measure a blockchain protocol's capacity. However, measuring the number of PTBs executed per second doesn't accurately reflect Sui's computational capacity. As the average PTB size increases, Sui's throughput increases, but the PTB/second metric would remain unchanged. Therefore, the foundation has chosen to measure the number of individual transactions within a PTB executed per second as a more consistent and practical metric.

Time to Finality

Finality in blockchain refers to the point where a transaction is considered irrevocable and cannot be modified or reverted. For this performance update, the Time to Finality measures the point in the transaction lifecycle where both the transaction itself and its effects are final and can be used in subsequent transactions. Sui's Time to Finality is approximately 480 milliseconds, with a 95th percentile latency of around 550 milliseconds.

Future Optimization and Scalability

The Sui protocol has made significant progress in its performance, but there are still many opportunities for optimization and scalability. In the near future, the Sui Foundation plans to refine the following aspects:

  • Scalability and coverage of benchmark tooling
  • Horizontal scalability to support intra-validator scaling across multiple machines
  • Resilience to under-performance of individual validators

As the Sui protocol evolves and its performance improves, the Sui Foundation will continue to share updates with the community for feedback and consideration. With its impressive throughput and time to finality, the Sui network is poised to make a significant impact in the world of decentralized systems.

Revolutionizing Scalability: Sui Blockchain's Path to Mass Adoption in Web 3

· 2 min read
Dora Noda
Software Engineer

Sui Blockchain is a promising Layer-1 (L1) project that employs a unique set of technical innovations and tokenomics to deliver a scalable and efficient platform. This article will explore Sui's core innovations and evaluate its potential as a solution for mass adoption of Web 3.0 applications.

Key Innovations

  • Sui Move: A custom version of the Move language optimized for parallel execution, enabling frictionless mass asset creation and a smoother programming experience.
  • Single-Writer Transactions: A novel approach to handling simple transactions without consensus, using Byzantine Consistent Broadcast for security and efficiency.
  • Narwhal-Tusk Consensus Engine: A cutting-edge consensus mechanism using directed acyclic graph (DAG) data structures for high throughput and low latency.
  • Unique Tokenomics: Sui's tokenomics model addresses storage costs on the network by implementing a storage fund, which helps maintain relatively constant gas prices throughout the blockchain's lifetime. This design incentivizes validators and ensures ample storage space is available.

Evaluation

Sui Blockchain stands out with its innovative solutions to scalability, particularly the unlimited upper bound for single-write transactions. This makes it suitable for applications that rely heavily on single-writer transactions, like social media apps and mass NFT distribution.

Sui's scalability solutions unlock the potential for NFTs with low intrinsic value but high social purpose, such as on-chain coupons, decentralized IDs, and credit cards. Furthermore, Sui Move's language features can enable structurally storing objects on a blockchain with the security and permanence guarantees of the blockchain.

Conclusion

Sui Blockchain provides a viable blueprint for an L1 blockchain that can handle Web 2.0 level scalability. It symbolizes Web 3.0's growing maturity and the potential for a billion-user scale. Regardless of its long-term success, Sui's innovative approach to blockchain technology already represents a significant achievement.

Optimism Architecture

· 4 min read
Tian Pan
Community Hacker

Optimism is an EVM equivalent, optimistic rollup protocol designed to scale Ethereum. Scaling Ethereum means increasing the number of useful transactions the Ethereum network can process. Optimistic rollup is a layer 2 scalability technique which increases the computation & storage capacity of Ethereum without sacrificing security or decentralization. EVM Equivalence is complete compliance with the state transition function described in the Ethereum yellow paper, the formal definition of the protocol.

Optimistic rollup works by bundling multiple transactions into a single transaction, which is then verified by a smart contract on the Ethereum network. This process is called “rolling up” because the individual transactions are combined into a larger transaction that is submitted to the Ethereum network. The term “optimistic” refers to the fact that the system assumes that transactions are valid unless proven otherwise, which allows for faster and more efficient processing of transactions.

Overall Architecture

Optimism Architecture

op-node + op-geth

The rollup node can run either in validator or sequencer mode:

  1. validator (aka verifier): Similar to running an Ethereum node, it simulates L2 transactions locally, without rate limiting. It also lets the validator verify the work of the sequencer, by re-deriving output roots and comparing them against those submitted by the sequencer. In case of a mismatch, the validator can perform a fault proof.
  2. sequencer: The sequencer is a priviledged actor, which receives L2 transactions from L2 users, creates L2 blocks accordingly, and then submits to data availability provider (via a batcher). It also submits output roots to L1. There is only one sequencer in the entire stack for now, and it's where people critisize that OP stack is not decenralized.

op-batcher

The batch submitter, also referred to as the batcher, is the entity submitting the L2 sequencer data to L1, to make it available for verifiers.

op-proposer

Proposer generates and submitting L2 Output checkpoints to the L2 output oracle contract on Ethereum. After finalization period has passed, this data enables withdrawals.

Both batcher and proposer submit states to L1. Why are they separated?

Batcher collect and submit tx data into L1 with a batch, while proposer submits the commitments (output roots) to the L2's state, which finalizes the view of L2 account states. They are decoupled so that they can work in parallel for efficiency.

contracts-bedrock

Various contracts for L2 to interact with the L1:

  • OptimismPortal: A feed of L2 transactions which originated as smart contract calls in the L1 state.
  • Batch inbox: An L1 address to which the Batch Submitter submits transaction batches.
  • L2 output oracle: A smart contract that stores L2 output roots for use with withdrawals and fault proofs.

Optimism components

How to deposit?

How to withdraw?

Feedback to Optimism's Documentation

Understanding the OP stack can be challenging due to a number of factors. One such factor is the numerous components that are referred to multiple times with slightly different names in code and documentation. For example, the terms "op-batcher" and "batch-submitter" / "verifiers" and "validators" may be used interchangeably, leading to confusion and difficulty in understanding the exact function of each component.

Another challenge in understanding the OP stack is the evolving architecture, which may result in some design elements becoming deprecated over time. Unfortunately, the documentation may not always be updated to reflect these changes. This can lead to further confusion and difficulty in understanding the system, as users may be working with outdated or inaccurate information.

To overcome these challenges, it is important to carefully review all available documentation, to keep concepts consistently across places, and to stay up-to-date with any changes or updates to the OP stack. This may require additional research and collaboration with other users or developers, but it is essential in order to fully understand and effectively utilize this complex system.

Introduction to Optimism: Scaling Ethereum with Optimistic Rollup

· 7 min read
Dora Noda
Software Engineer

Optimism is an optimistic rollup protocol that provides a solution for scaling Ethereum without sacrificing security or decentralization. The protocol achieves this by increasing the computation and storage capacity of Ethereum, while remaining maximally compatible with existing Ethereum infrastructure.

Introduction to Optimism: Scaling Ethereum with Optimistic Rollup

Basics

What is Ethereum scalability?

Ethereum scalability refers to the ability of the Ethereum network to process a greater number of useful transactions. The current limited resources of Ethereum, specifically bandwidth, computation, and storage, make it challenging to process a high volume of transactions. Computation and storage are the most significant bottlenecks, leading to extremely high fees. To scale Ethereum and reduce fees, it is necessary to better utilize bandwidth, computation, and storage.

What is an Optimistic Rollup?

Optimistic rollup is a layer 2 scalability technique that allows for off-chain execution of transactions while maintaining security and decentralization. Transaction data is submitted on-chain, but executed off-chain. In case of an error in the off-chain execution, a fault proof can be submitted on-chain to correct the error and protect user funds. This approach is similar to going to court only if there is a dispute, and executing transactions on-chain only if there is an error.

What is EVM Equivalence?

EVM Equivalence refers to complete compliance with the state transition function described in the Ethereum yellow paper, which is the formal definition of the Ethereum protocol. An EVM equivalent rollup protocol adheres to the Ethereum standard across EVMs, ensuring that smart contract developers can write code once and deploy it anywhere. This means that any smart contract written for the Ethereum mainnet can be deployed to an EVM equivalent rollup protocol with little to no modification.

Optimism = EVM equivalent + optimistic rollup + scaling Ethereum

Optimism is an EVM equivalent optimistic rollup protocol designed to scale Ethereum while maintaining maximum compatibility with existing Ethereum infrastructure.

Security

To scale Ethereum without sacrificing security, Optimism preserves three critical properties of Ethereum layer 1: liveness, availability, and validity.

  1. Liveness - Anyone can extend the rollup chain by sending transactions at any time.
    • Transactions can be sent to the rollup chain via the sequencer or directly on layer 1. The sequencer provides low latency and low-cost transactions, while sending transactions directly to layer 1 provides censorship resistance.
  2. Availability - Anyone can download the rollup chain.
    • All information required to derive the chain is embedded into layer 1 blocks. Thus, as long as the layer 1 chain is available, so is the rollup.
  3. Validity - All transactions are correctly executed, and all withdrawals are correctly processed.
    • The rollup state and withdrawals are managed on an L1 contract called the L2OutputOracle, which is guaranteed to only finalize correct (i.e., valid) rollup block hashes given a single honest verifier assumption. If an invalid block hash is asserted on layer 1, an honest verifier will prove it is invalid and win a bond.

Optimism enforces validity of a rollup through fault proofs. Validity proofs can also be plugged in once they become feasible.

Network Participants

There are three actors in Optimism: users, sequencers, and verifiers.

Optimism Network Participants

Users

At the core of the network are users who can deposit or withdraw arbitrary transactions on L2 by sending data to a contract on Ethereum mainnet. They can use EVM smart contracts on layer 2 by sending transactions to the sequencers and view the status of transactions using block explorers provided by network verifiers.

Sequencers

The sequencer is the primary block producer. There may be one sequencer or many using a consensus protocol. For 1.0.0, there is just one sequencer, currently operated under the oversight of the Optimism Foundation. In general, specifications may use "the sequencer" to be a stand-in term for the consensus protocol operated by multiple sequencers.

The sequencer

  1. accepts user off-chain transactions,
  2. observes on-chain transactions (primarily, deposit events coming from L1),
  3. consolidates both kinds of transactions into L2 blocks with a specific ordering, and propagates consolidated L2 blocks to L1 by submitting two things as calldata to L1:
    1. the pending off-chain transactions accepted in step 1, and
    2. sufficient information about the ordering of the on-chain transactions to successfully reconstruct the blocks from step 3, purely by watching L1.

The sequencer also provides access to block data as early as step 3 so that users may access real-time state in advance of L1 confirmation if they so choose.

Verifiers

Verifiers serve two purposes:

  1. serving rollup data to users and
  2. verifying rollup integrity and disputing invalid assertions.

To maintain network security, there must be at least one honest verifier who can verify the integrity of the rollup chain and serve blockchain data to users.

Key Interaction Diagrams

The following diagrams demonstrate how protocol components are utilized during key user interactions to provide context when diving into any particular component specification.

Depositing and Sending Transactions

Users often begin their L2 journey by depositing ETH from L1. Once they have ETH to pay fees, they start sending transactions on L2. The following diagram demonstrates this interaction and all key Optimism components, which are or should be utilized:

Depositing and Sending Transactions

Withdrawing

Withdrawals are initiated by normal transactions on L2 but completed using a transaction on L1 after the dispute period has elapsed.

Diagram of Withdrawing

Conclusion

Optimism is an optimistic rollup protocol designed to scale Ethereum while maintaining maximum compatibility with existing Ethereum infrastructure. By increasing the computation and storage capacity of Ethereum, it provides a solution for processing a greater number of useful transactions without sacrificing security or decentralization. If you want to learn more about Optimism, please go to their official specs. With its adherence to Ethereum's core principles and compatibility with existing infrastructure, Optimism is poised to be a key player in Ethereum's journey to become a more scalable and efficient network.

Are you tired of spending countless hours setting up and maintaining your node for Optimism rollup? Do you wish there was an easier way to connect to the network? With BlockEden.xyz Optimism RPC, you can connect to the Optimism rollup in just minutes! Say goodbye to the frustrating and time-consuming process of setting up and maintaining your node.

BlockEden.xyz Optimism RPC simplifies the process of connecting to the Optimism rollup, allowing you to focus on what really matters - developing your project. With our easy-to-use platform, you can quickly and effortlessly connect to the network, saving you valuable time and resources.

Our platform provides a hassle-free solution for developers who want to take advantage of the benefits of Optimism Rollup without the time-consuming setup and maintenance. Our team of experts ensures that the technology is always up-to-date, so you can be confident in the stability and reliability of your application.

Don't let the complexities of Optimism Rollup hold you back from creating the best possible application. Let BlockEden.xyz Optimism RPC take care of the technical details so you can focus on what you do best - innovating and creating. Sign up for BlockEden.xyz or try it out today and experience the benefits of seamless connectivity and increased efficiency!

Why Sui Blockchain is a Promising Platform for Fast and Efficient Processing of Transactions

· 3 min read
Dora Noda
Software Engineer

In the world of blockchain, speed and efficiency are vital for the success of any platform. Enter Sui Blockchain, a platform that promises to deliver low latency transaction processing and smart contract execution.

Sui and BlockEden.xyz

One of the unique features of Sui Blockchain is its ability to distinguish between different kinds of object ownership. Unlike other blockchain platforms where every contract and object is mutably shared, Sui allows an object to be owned by an address and can be mutably owned, immutably owned, or mutably shared. This feature is leveraged for parallel execution of smart contracts and asset management.

Sui uses a decentralized permissionless smart contract platform, biased towards low-latency management of assets. It uses the Move programming language to define assets as objects that may be owned by an address. The platform is maintained by a permissionless set of authorities that play a role similar to validators or miners in other blockchain systems.

To achieve low latency, Sui separates transaction processing into two phases: 1) acquiring distributed locks at the granularity of objects and 2) executing the transaction and committing its effects.

Phase one is performed through a reliable broadcast primitive that requires no global synchronization within the authority, allowing for scalability through sharding. For transactions involving shared objects, sequencing is required using a consensus protocol.

Sui aggressively reduces bottlenecks and points of synchronization requiring global locks within authorities, allowing for quasi-linear scaling with increased resources. The platform also allows for parallel execution of smart contracts, with Move virtual machines on multiple cores or physical machines reading versioned input objects, executing, and writing resulting objects from and to stores.

The consistency requirements on stores for objects and transactions are very loose, allowing scalable distributed key-value stores to be used internally by each authority. Sui uses a Byzantine consistent broadcast protocol between authorities to ensure the safety of common operations on assets, ensuring lower latency and better scalability as compared to Byzantine agreement.

Overall, Sui Blockchain's design choices and optimizations make it a promising platform for applications that require fast and efficient processing of transactions. Its ability to 1) distinguish between different kinds of object ownership, 2) acquiring distributed locks at the granularity of objects, and 3) parallel execution of smart contracts are key features that set it apart from other blockchain platforms. With Sui Blockchain, the future of fast and efficient transaction processing is here.

Let's talk about blockchain TPS

· 3 min read
Jack Sim
Web3 Builder

Note: Metrics cited here were taken from October 2022 and may no longer reflect current network performance.

On Day 1 of Aptos Mainnet launch, there’s some confusing conversations on social media

TPS is the acronym for transactions per second and how engineers measure the volume of the network traffic. There are multiple scenarios when we are talking about TPS:

  • Max TPS means the maximum network traffic a blockchain could support . This is determined by how fast a chain could reach consensus and mint a new block, and the block size (e.g., BTC) the gas limit (e.g., Ethereum) of a block. For ethereum and later blockchain that support smart contracts, it makes more sense to be limited by gas, because different transactions (e.g., 1-to-1 token transfer vs multi NFT token mint) has various computation complexity, and they need to be metered consistently. That said, max TPS is not a very strict measurement of a chain’s throughput. Instead, max gas per second is. Then, how do developers get the value of the max TPS? It’s usually a result of experiments - upper bound given the good network condition, fully available validators, and simplest transactions.

  • Actual TPS is the current traffic volume of a blockchain in operation. This is majorly determined by how busy the network is. Around the launch of Aptos Mainnet, there’s not many dApps ready, and not many users holding Aptos tokens, so that not many people were doing business on Atpos at that moment. That’s why the actual TPS was low at that moment. However, actual TPS will be bounded by max TPS. The so-called Ethereum congestion is the moment when actual TPS already reaches max TPS, no more transactions could be processed, and they have to wait.

So Aptos’s high max TPS will demonstrate its advantage when the ecosystem is growing up, when we will still see almost instant transaction settlement and low transaction fee.

Then, let’s get back to BlockEden.xyz customers. We offer node API services at different tier, where the major difference is QPS (similarly, the acronym of queries per second) limit of using our service. Free tier basically gets 1 QPS, while Pro tier gets 10 QPS. That means how many REST API calls you could make per second. This is different from how many transactions could be settled on blockchain per second. When you call REST API, you may not only do the write operations (aka sending a transaction), but you could also do lots of read operations (e.g., getting account info, getting a block, getting a transaction).

If you haven’t signed up for our services, please visit this link to start from free.