Onchain agents are set to revolutionize DeFi, simplifying complex processes and opening the doors for many new use cases. So why hasn’t this revolution fully arrived yet? The problem lies in the current user experience—dealing with cumbersome wallets, navigating endless risks, and managing assets across multiple chains. It’s far from ideal. But onchain agents can solve this. Instead of directly managing wallets and assets, we’ll soon manage portfolios of agents that automate everything from high-yield opportunities to cross-chain bridging.
At Spartan Labs, our exploration of ERC-6551 revealed a new frontier for onchain automation: AI-powered agents capable of initiating transactions based on user intent. This led to the creation of Scroller, an onchain agent designed to optimize cross-chain transactions, with a focus on bridging assets between Ethereum and L2 networks like Scroll.
The Problem
Most users continue to rely on the official Scroll bridge to transfer assets from Ethereum to Scroll L2, largely because of its ease of use and security. However, there are two consistent pain points for users onchain:
High gas costs. During high-demand times on the Ethereum Mainnet, gas fees remain a significant challenge for many onchain users. To minimize costs, users often delay transactions, waiting for off-peak times, which leads to inefficiencies and frustration. The introduction of blobs (EIP-4844) has helped reduce gas costs on the Ethereum Network, though its primary benefits have been seen with L2 rollups.
Security. Navigating the Web3 ecosystem is also complex, with users facing risks such as connecting to malicious sites or authorizing invalid transactions. This makes them hesitant to engage in certain processes, like bridging, especially on newly launched L2 networks.
Several solutions have emerged to combat these challenges. Across Bridge leverages intents-based architecture—enabling decentralized, automated onchain processes—to reduce costs, remove risks, and speed up the bridging process for users. Onchain agents also present a promising solution to these challenges. For example, SphereOne’s Super Agent uses AI to simplify transactions and perform bridging autonomously, reducing the risks of connecting to malicious sites.
At Spartan Labs, we believe that onchain agents will soon dominate the majority of daily active users. This future is already taking shape: AI agents built on Autonolas are behind over 75% of Safe transactions on the Gnosis Chain.
We designed Scroller as an experiment to create a novel onchain agent that addresses not only high gas costs and security concerns but also leverages AI to predict gas prices and execute transactions non-deterministically. Instead of following rigid instructions, the AI would adapt to current conditions, such as fluctuating gas prices, making transactions more efficient and flexible. Our goal was to make cross-chain transactions cost-efficient, safe, and seamless while driving onchain activity to Scroll throughout the lifetime of the experiment.
How Scroller solves the problem
Scroller's core innovation lies in its ability to generate intent-driven actions. Traditional onchain agents typically react to predetermined conditions, but Scroller goes a step further by initiating transactions when specific conditions are met, such as optimal gas prices. This means users can bridge assets without actively monitoring the blockchain, making the process more efficient and less prone to delays.
At the heart of the project was the idea of creating a bridging NFT, underpinned by token-bound accounts (ERC-6551). This allowed our AI-powered agents to autonomously initiate and manage transactions, minimizing the risks associated with manual intervention. Scroller was designed to bridge from Ethereum to L2s, starting with Scroll, and to optimize transactions based on dynamic gas prices, ensuring that users enjoyed reduced costs without compromising security.
Once we decided to create a bridging NFT, we established several key objectives:
Identify and partner with an L2 network, such as Scroll, to bridge from Ethereum Mainnet.
Develop the ERC-6551 implementation to facilitate the bridging process autonomously.
Create an AI model capable of predicting optimal gas prices for transactions, improving efficiency and reducing costs.
Project Roadmap
To bring Scroller to life, we outlined a detailed roadmap:
ERC-721 NFT Contract and Artwork: The foundational elements of the bridging NFT, including its design and functionality.
ML Model: Developing an ML model that predicts when gas is favorable to initiate bridge.
ERC-6551 Account Implementation: Developing the underlying account infrastructure to support token-bound accounts.
Scroll Canvas Badge and Airdrop Logic: Incentivize participation and reward users with an “Onchain Agent badge” to be implemented in Scroll’s Canvas campaign.
Focus on UX and automation
Building an AI-powered onchain agent posed several challenges, from ensuring gas price predictions were accurate to simplifying the user experience. We knew that for Scroller to succeed, users needed to feel confident that the system was not only reliable but also straightforward to use. Therefore, our design process focused heavily on user experience, ensuring that interactions with Scroller agents were intuitive and transparent.
The technical stack supporting Scroller included Solidity for smart contracts, Python for the AI model's gas price predictions, and Alchemy for seamless blockchain interactions. While ERC-6551 allowed for the automation of token-bound accounts, the AI-driven gas optimization ensured users could trust Scroller to minimize their transaction costs.
One challenge was the volatility of gas prices. Our AI model needed constant adjustments and retraining to stay responsive to market conditions. Another hurdle was explaining how the AI system operated; users needed clarity on why transactions occurred at certain times. Through multiple iterations and testing, we refined both the logic and user interface to provide clearer insights into how Scroller's automation worked.
Scroller's impact and the future of onchain agents
Scroller's launch was met with enthusiasm, exceeding our expectations by bridging over 83 ETH from Ethereum to Scroll. This success validated our thesis that intent-driven onchain agents could stimulate user engagement and create real value in decentralized ecosystems.
However, the increased demand revealed scalability challenges on the backend, which we are now working to optimize further. User feedback also indicated that while the concept of automated bridging was highly appreciated, many needed clearer guidance on how the AI-driven process functioned. In response, we enhanced our documentation and introduced more detailed tutorials, improving the onboarding experience for both new and seasoned users.
Scroller's performance also demonstrated the broader potential for onchain agents to drive decentralized activity across various chains. By focusing on intent-driven actions, Scroller went beyond reactive automation, actively contributing to onchain traffic and engagement. This aligns with our belief that onchain agents will eventually dominate the majority of onchain daily active users (DAUs).
Conclusion
Our long-term vision for Scroller and other onchain agents is to contribute to a fully automated onchain ecosystem. As automation continues to play a crucial role in shaping decentralized systems, we believe that onchain agents will drive a significant portion of blockchain activity, reducing complexity for users and making decentralized ecosystems more accessible.
Scroller bridged over 83 ETH from Ethereum to Scroll, validating our assumption that onchain agents can actively generate meaningful activity for projects. By autonomously initiating cross-chain transactions at optimal times—guided by AI-driven gas price predictions—Scroller reduces complexity and costs for users, making it easier for them to interact with decentralized systems without the usual friction. While the broader adoption of onchain agents will empower users to seamlessly interact with DeFi, Scroller is already demonstrating how these agents can transform the landscape.
As we continue to experiment and push the boundaries of what onchain agents can achieve, we look forward to a more interconnected and automated blockchain ecosystem. If you are building in this space and want to brainstorm new ideas for onchain agents, please shoot us a message on 𝕏.