Thursday, May 30, 2024
No menu items!
HomeDatabase ManagementBuild with blockchain data using Amazon Managed Blockchain and ZettaBlock

Build with blockchain data using Amazon Managed Blockchain and ZettaBlock

In the rapidly evolving realm of Web3, developers face the daunting challenge of managing and using vast amounts of blockchain data. This is where ZettaBlock steps in, revolutionizing Web3 development by offering a unified platform that integrates real-time and historical on-chain and off-chain data, both public and private.

Enhanced with AI-driven tools, ZettaBlock is designed to streamline the development of custom applications, earning the trust of leading names in the industry such as Chainlink, Polygon, SUI, and Crypto.com. By using Amazon Managed Blockchain (AMB) Access as a core provider, ZettaBlock elegantly simplifies the complexities of custom data pipeline creation.

Decentralized applications (dApps) have to rely on both node infrastructure and custom data pipelines, a combination that presents a costly and intricate challenge. With Amazon Managed Blockchain and ZettaBlock, developers can build blockchain data pipelines in a performant, cost-efficient manner.

AMB Access equips developers with managed blockchain nodes and serverless APIs, facilitating seamless interactions with major public blockchains such as Ethereum mainnet, Bitcoin, and Polygon PoS. AMB Access eliminates rising costs and undifferentiated heavy lifting related to blockchain node operations in favor of fully managed nodes or a highly performant, pay-as-you-go JSON-RPC API to handle request traffic to a fleet of blockchain nodes managed by AWS. This positions AMB Access as the primary conduit for reading from and writing to public blockchains like Ethereum, Polygon, and Bitcoin, simplifying blockchain application development while providing reliability and real-time data access.

In this post, we describe how you can use Managed Blockchain and ZettaBlock to build solutions that address a wide variety of use cases, with a focus on user attribution and compliance monitoring.

Managed Blockchain and ZettaBlock: A synergy for Web3 success

With the power of Managed Blockchain, ZettaBlock indexes any blockchain in the most reliable way possible. This collaboration provides developers with access to dependable, real-time data for enhancing user attribution or user analytics in their dApps (covered later in this post), thanks to the robust infrastructure provided by AWS. This partnership not only accelerates the development process but also introduces a level of scalability and cost-efficiency previously unattainable.

Managed Blockchain offers the following benefits:

Faster time to market – AMB Access lets developers get started building differentiated aspects of their application without provisioning or setup time, enabling faster time to market
Automatic scaling – You can scale blockchain applications effortlessly as your workload grows, with automatic scaling of JSON-RPC APIs handled by AMB Access
Cost-efficient management – You can operate your blockchain applications with cost-efficiency, saving up to 80% in blockchain node spending compared to self-managed infrastructure, with simple-to-understand, pay-per-request pricing
Production-grade applications – You can build production-grade blockchain applications that depend on AWS’s high bar for reliability, security, and availability (99.9% node uptime)

ZettaBlock offers the following:

Highly flexible and customizable queries – You can use SQL instead of nested GraphQL schemas to build your custom endpoint, while still having access to a GraphQL endpoint as output
Low-latency APIs – You can achieve 100-millisecond API response time, subsecond data freshness, high throughput, and petabyte-scale joins
Unified and straightforward data access – ZettaBlock allows you to bring your off-chain data to join with on-chain data, in-house, all in one go, if you don’t want to rely on your backend
Enterprise-grade service – ZettaBlock is fast, reliable, and cost-efficient, with zero infra overhead and 99.95% uptime to support real-time, data-intensive apps

The following figure illustrates the ZettaBlock architecture and workflow.

The following figure compares ZettaBlock against other solutions.

Together, Managed Blockchain and ZettaBlock are not merely offering tools, but are forging a pathway for innovation, efficiency, and growth in the Web3 ecosystem. By providing a robust, scalable, and cost-effective environment, this partnership is setting a new standard for Web3 application development, providing developers with the resources they need to bring their visionary projects to life.

With ZettaBlock and Managed Blockchain, you can address a variety of use cases, including high-impact use cases in financial services and Web3, such as user attribution and compliance monitoring. We discuss both use cases in more detail in the following sections.

Web3 user attribution

In the Web3 space, the ability to analyze address and wallet data is vital for dApps, facilitating data-driven decisions by connecting product metrics with user metadata.

The process of user attribution typically involves the following steps:

Collect cookie metadata (either via custom SDKs or via external providers) to gather user demographics and favorite apps, which help in understanding user demographics and preferences.
Gather metrics on user behavior and product usage.
Use ZettaBlock’s intuitive analytics interface to access insights derived from the fusion of on-chain (such as wallet data: transaction history, balances, protocols interacted with, and more) and off-chain data (collected in the previous steps), providing a holistic view of user engagement.

In the realm of Web3, these requirements remain largely the same, albeit with some nuances. In this section, we delve into the specifics of using a Web3 user attribution flow with Managed Blockchain and ZettaBlock.

Web3 user attribution is a critical aspect of the Web3 ecosystem that enables data-driven decision-making, fostering growth and innovation in the decentralized application landscape. Let’s look at the key steps in this process, as illustrated in the following figure.

User wallet connection

When a user connects their wallet (logs in) to a dApp, an SDK captures their wallet information. This crucial first step lays the foundation for collecting vital wallet data, which ZettaBlock uses to facilitate on-chain analytics and insights. This enhances user engagement strategies by allowing for a more personalized approach.

Data storage and identification

The data is stored in several ways, including user and session ID information. If the user has connected multiple wallets to the site or has interacted with multiple wallets that are uniquely identifiable (based on the same cookies or similar cookies), a table can be generated with a user ID and wallet lookup. This data is typically stored in a company’s private database, although the data can also be stored with ZettaBlock’s database solution.

Fetching on-chain data

The next phase involves running on-chain queries for the wallets of interest, with the results stored in the company’s warehouse. This process is enhanced by ZettaBlock’s capability to extract meaningful on-chain data, offering insights into user behavior and wallet activity that are essential for customizing user experiences.

Data aggregation and analysis

By joining wallet and user data with cookie metadata, you can create a comprehensive internal view for decision-making. This step transforms fragmented data into a powerful analysis tool, allowing dApps to understand and anticipate user behavior more effectively, thereby informing strategy and product development.

Actionable insights and incentivization

With a refined dataset, dApps can now implement targeted engagement and loyalty strategies.

The following are common incentives in Web3 to reward users for usage:

Token airdrop – A dApp can look at the result of the user attribution data and, if they are planning a token launch, reward the users with the token of their dApp for being early adopters of the application
NFT airdrop – Similarly, a dApp could reward users with an NFT token, of different rarity, depending on how loyal the users are to the application

To perform this action, the dApp uses Managed Blockchain to make the final write call (broadcasting a signed transaction) to the blockchain to distribute this NFT or token airdrop. You could also offer other off-chain rewards.

Web3 compliance monitoring

Enforcing the integrity and compliance of the contracts your organization interacts with is critical, from identifying potential wash trading to accurately labeling entities within the Web3 space. Compliance monitoring is indispensable, safeguarding your organization against the risks of inadvertently compromising user trust and assets. It makes sure that operations not only adhere to regulatory standards but also protect users from potential security breaches and financial losses.

Compliance monitoring plays dual roles, acting as both a preventative measure and a continuous monitoring tool. Firstly, it assesses whether a proposed feature is compliant before it is released to users. Furthermore, it continuously checks existing offerings to make sure they remain compliant amidst shifting compliance requirements, thereby protecting users from exposure to harmful content.

The following are key use cases for Web3 compliance monitoring:

Risk mitigation – Continuous monitoring enables organizations to quickly identify and address potential vulnerabilities or exploits in contracts. By actively scanning for signs of faulty or malicious contract behavior, organizations can preemptively withdraw user funds from at-risk contracts, significantly reducing the risk of financial loss and maintaining user trust.
Enhanced security with contract bytecode flagging – The process of analyzing contract bytecode—examining the functions it exposes, the Solidity version used, and other critical factors—serves as a powerful tool for enforcing the security and integrity of contracts offered to users. This analysis helps identify contracts that may exhibit unusual or potentially harmful activities.

Let’s dive into how Managed Blockchain and ZettaBlock can help with compliance monitoring.

Any comprehensive compliance monitoring system must include the capabilities for both proactive measures in evaluating new offerings and for ongoing, real-time surveillance.

This dual approach to compliance—combining ZettaBlock’s historical logging capabilities with real-time monitoring in Managed Blockchain—means that organizations can retrospectively make sure past actions meet current standards and instantaneously address potential issues as they arise. This comprehensive coverage is crucial for maintaining compliance in an ever-evolving regulatory environment and for safeguarding against the introduction of non-compliant products or features.

For the task of historical logging and flagging of data, organizations can use ZettaBlock’s SQL offerings. This tool allows for the creation of customizable heuristics for monitoring, which can be seamlessly integrated into either an in-house dashboard or ZettaBlock’s own dashboard. Beyond mere data analysis, ZettaBlock’s triggers enable real-time monitoring, transforming alerts into actionable insights instantly.

You can use these foundational capabilities to address business use cases within a variety of industries. In this post, we discuss use cases for risk mitigation and contract bytecode flagging.

Risk mitigation

Imagine an organization that offers a lending product to its users. To safeguard this service, they employ compliance monitoring with triggers set to detect various flags indicating potential compliance breaches or malicious activities.

One day, the monitoring toolkit flags an alert signaling a malicious action, such as interaction with mixer contracts like Tornado Cash or hacker addresses. In the current scenario, the organization might struggle with delayed responses, risking user funds and potentially violating compliance standards.

With ZettaBlock and AMB Access, the organization can automate an immediate response to such alerts. For example, an action can be instantly triggered to withdraw all user funds, safeguarding assets before they can be compromised.

This prompt action makes sure the organization remains compliant with regulations and protects user assets from malicious threats, addressing the critical pain point of timely response to security breaches.

Contract bytecode flagging

Auditing contract bytecode is a complex challenge. Auditors and large organizations need tools to access, decompile (either statically or dynamically), and analyze contracts for vulnerabilities or to scrutinize the contract creator’s history.

The lack of real-time and historical data on contract creation hampers the ability to effectively audit or monitor new contracts. In addition, it’s difficult to generate insights and warnings on potential vulnerabilities without comprehensive access to contract bytecode and its states.

ZettaBlock provides auditors with the necessary tools to access both the creation bytecode and the evolving state of contracts they want to audit. It also enables monitoring of contract creators, alerting users to new deployments or features by trusted protocols across different blockchains.

This can help you solve the following pain points:

For auditors, ZettaBlock streamlines the process of contract analysis, making it straightforward to identify vulnerabilities and enforce the security of blockchain protocols
Organizations can monitor contract deployments in real time, making sure that they’re always aware of the actions of trusted protocol deployers, thereby alleviating concerns over missed updates or security flaws

Conclusion

In this post, we described how you can use public blockchain data solutions Managed Blockchain and ZettaBlock to build solutions that address a wide variety of use cases, such as on-chain user attribution and monitoring of on-chain activity for compliance purposes. To learn more about these services, refer to the ZettaBlock Developer Hub or Build on the Polygon network with Amazon Managed Blockchain Access.

About the Authors

Jordan Davis leads GTM at ZettaBlock, focusing on business development and strategic partnerships in the Web3 and blockchain ecosystem. When he’s not working, he’s spending time with family, traveling, cooking, and drinking wine.

Konstantinos Kompogiannopoulos is a Blockchain Web3 Data/Analytics Engineer at ZettaBlock. Outside of work, he enjoys playing basketball, music, attending concerts, reading and researching Web3 technologies.

Forrest Colyer manages the Web3/Blockchain Specialist Solutions Architecture team that supports the Amazon Managed Blockchain (AMB) service. Forrest and his team support customers at every stage of their adoption journey, from proof of concept to production, providing deep technical expertise and strategic guidance to help bring blockchain workloads to life. Through his experience with private blockchain solutions led by consortia and public blockchain use cases like NFTs and DeFi, Forrest helps enable customers to identify and implement high-impact blockchain solutions.

Read MoreAWS Database Blog

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments