Abstract
In the emerging Web 3.0 landscape, Connected Autonomous Vehicles (CAVs) rely on smart contracts for critical operations such as charging negotiations, ridesharing, and traffic coordination. However, the "siloed" nature of Ethereum-based smart contracts prevents them from directly reading data from one another, a challenge known as the Cross-Contract Data Feed (CCDF) problem. This paper presents DeFeed, a secure, decentralized protocol that utilizes a hub-and-spoke architecture to enable efficient data sharing. By implementing request batching and caching mechanisms, DeFeed reduces gas costs by over 50% while maintaining decentralized governance and security.
Introduction
The vision of a decentralized transportation network requires seamless, automated collaboration between autonomous agents. While human users can easily observe the state of any contract on a public blockchain, smart contracts themselves are restricted from accessing variables stored in another contract's storage trie. Currently, developers circumvent this by using manual integrations or centralized third-party mediators. These methods introduce significant security risks, high costs, and single points of failure that undermine the core tenets of Web 3.0.
DeFeed addresses the CCDF problem by acting as a secure data exchange hub, allowing CAVs to interact with disparate data sources without compromising decentralization or incurring prohibitive transaction fees.
System Architecture and Methodology
DeFeed is built on a modular architecture that prioritizes security, upgradeability, and efficiency. The protocol's core logic is divided into two primary components:
- Data Feed Center (CDFC): This contract handles the underlying logic and data processing.
- Data Feed Management (CDFM): This acts as a proxy interface for users. By using this proxy pattern, the protocol can be updated or patched without forcing CAVs to migrate to new contract addresses.
The chainedCALL Pattern
To ensure secure data transmission, DeFeed introduces the chainedCALL pattern. Unlike standard one-way calls, this mechanism follows a strict three-step sequence: request -> response -> receive. This flow ensures that data is passed securely between the requester and the owner through the DeFeed hub. To prevent malicious interference, the protocol employs strict address verification (accessOnly) at every stage of the sequence.
Optimization Strategies
To make decentralized data sharing economically viable for high-frequency vehicle interactions, DeFeed implements several gas-saving features:
- Request Pooling: The
Poolfunction aggregates multiple requests for the same data source into a single batch. By waiting for a small time window (3 blocks), the system processes these requests together, eliminating redundant computation. - Caching: The
Cachefunction stores the results of successful requests. If another contract requests the same data shortly thereafter, DeFeed serves the result from the cache rather than executing a new, expensive cross-contract query. - Event-Driven Subscriptions: The
Subscribefunction allows contracts to "follow" the state of another contract. Instead of expensive polling (constant checking), contracts receive automatic notifications only when the state changes.
Experimental Evaluation
The authors evaluated DeFeed on the Ethereum Sepolia Testnet using simulated traffic loads ranging from 1 to 100 requesting contracts. The evaluation focused on gas efficiency, cost-effectiveness, and system throughput.
Key Results
- Gas Efficiency: The protocol demonstrated significant scalability. At a volume of 100 requests, the Pool mechanism reduced gas consumption by approximately 36%. The Cache mechanism proved even more effective, slashing gas costs by 54.9% compared to standard requests.
- Operational Costs: While the one-time deployment of the protocol costs roughly $16.00, individual data requests are priced at approximately $1.00, and subscription updates are as low as $0.35.
- Performance: The system achieved an average throughput of 0.07 Transactions Per Second (TPS) with an average latency of 13.8 seconds. While these metrics are constrained by the underlying performance of the Ethereum testnet, they are sufficient for non-instantaneous coordination tasks like charging schedules.
Discussion and Future Work
DeFeed successfully demonstrates that decentralized data feeds can be both secure and cost-effective. However, the current throughput of 0.07 TPS remains a bottleneck for high-density urban environments where thousands of vehicles may need to communicate simultaneously.
Future research will focus on expanding DeFeed to non-EVM (Ethereum Virtual Machine) chains such as Solana or Polkadot and exploring Layer-2 scaling solutions to increase throughput. Additionally, the authors highlight the need to navigate varying legal jurisdictions regarding decentralized data sharing and to further enhance privacy protections for vehicle owners.
Summary updated