project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

EGNH Project

A blog setup where you can require payment for specific articles via the x402 protocol.

EGNH Project

Created At

ETHGlobal New York 2025

Project Description

This project has a few components:

The first component is a basic blog setup where you can specify certain articles to require payment via the x402 protocol. This allows you to charge for articles without requiring the user to sign up for any service or do any authentication with you. It's all over HTTP!

Another neat new feature about the blogging setup is that anyone who visits your website can make a special link that embeds an address. There is a splitter smart contract that will be sent the money instead if you use this special link in order to read a paid post. The splitter contract will keep some of the payment, but will send the rest of it to the address specified by the user who created the special link. In this way, it essentially implements ad-hoc promotion codes that directly pay you out whenever someone uses it. This gives an incentive to people to share your content so they can earn some of the income from readers as well.

A final component is a smart contract that can split an incoming transaction into a kept part and a payout part to a specific address (specified by the sender). A "splitter" if you will. This integrates into the blocking framework as follows:

Another component is a dashboard, where you can view your income from people reading your paid posts, and also who your top contributors are.

How it's Made

The blog is a NextJS app. It uses Coinbase's x402 libraries for x402 interactions and ethers for blockchain interactions.

The dashboard is also a NextJS app. It uses Coinbase's SDK for querying blockchain information.

The splitter contract is built with Nomic's Hardhat, and uses Openzeppelin's contract library (e.g. for ERC20).

background image mobile

Join the mailing list

Get the latest news and updates