NTU CZ4153 Blockchain Technology — an Ethereum dApp for fee-free smart-contract interactions using meta-transactions and a gas relayer.
Developed under the course option Bluejay Gasless Token. The project implements an ERC-20 ChickenRiceToken (CRT) and a front-end that lets wallet users transfer tokens without paying an Ethereum transaction fee. A relayer network (Biconomy / OpenZeppelin GSN) submits signed intents and covers gas on the user’s behalf.
This repository demonstrates the same pattern with an OpenZeppelin GSN Counter contract and React client: an on-chain counter can be incremented without the end user funding gas.
- The user signs a message describing the intended call (not a conventional gas-paying transaction).
- A relayer submits the transaction to the network and pays ETH gas.
- On-chain state updates (in this sample:
Counter.valueincrements).
The accompanying term paper analyses the security implications of gasless relays — including Denial-of-Service and single-point-of-failure risks when the relayer is centralized, and reentrancy considerations in Solidity.
| Path | Description |
|---|---|
contracts/Counter.sol |
Solidity contract using OpenZeppelin GSNRecipient. increase() updates an on-chain counter; relayed calls are approved in acceptRelayedCall. |
client/ |
React (Create React App) UI via @openzeppelin/network GSN helpers — connects to a local chain and invokes increase() without user-funded gas. |
build/contracts/ |
Compiled artifacts and ABIs consumed by the client. |
- Ethereum / Solidity (^0.5)
- OpenZeppelin GSN (
GSNRecipient,@openzeppelin/network) - React (Create React App)
- Ganache / local provider (
http://127.0.0.1:8545)
# repository root
npm install
# start a local Ethereum node (e.g. Ganache) on :8545
# deploy Counter via OpenZeppelin CLI (or equivalent)
cd client
yarn install # or npm install
yarn start # React app on :3000Configure the client against the local network (PROVIDER_URL in client/src/App.js). With GSN development mode enabled, relayed calls succeed without the end user holding ETH for gas.
Security, privacy, and scalability term paper (focus: Security of gasless relays):
Authors: Daryl Neo, Koo Jian Yang, Yeoh Shun Bin.