NERO LABS
Background pattern
Alpaca-lotto background
Alpaca-lotto logo
DeFiHackathon Project

Alpaca-lotto

Next-gen lottery on NERO Chain using AA and Paymaster for a seamless Web2-like UX

SolidityTypeScriptReactJSNode.jsHardhat
Submitted on May 15, 2025

Share this project

Team Members

HONGXI WANG

HONGXI WANG

Team Member

Core Purpose

Overview

AlpacaLotto is a Web3 lottery platform built on NERO Chain using Account Abstraction (ERC-4337) and AI optimization. Users can join with any token, pay gas flexibly, and interact with ease.

Key Features • Multi-token entry: Use any ERC20 token for tickets & gas • AI optimizer: Suggests best token based on cost, balance, volatility • Session keys: Sign once, play multiple times securely • Batch actions: Buy multiple tickets in one transaction • Social recovery: Restore wallet via trusted contacts

Tech Stack • Frontend: React, TypeScript, wagmi v2, viem • Backend: Node.js, Express, ethers.js • Contracts: Solidity 0.8.12, OpenZeppelin, ERC-4337 • AA SDK: userop, NERO Paymaster (Types 0/1/2 supported)

NERO Integration • Smart contract wallets (AA) • Pay with any token (via Paymaster) • Batch UserOps to reduce gas • Scoped session keys for safe, smooth UX

What's Next

Aiming to make AlpacaLotto even easier to use, especially for non-crypto users. Upcoming features include: • One-click wallet creation and gasless onboarding • Smarter AI suggestions for token and gas choices • Mobile-first session key experience • User-generated lotteries and NFT prize pools

As a real-world use case of Account Abstraction, AlpacaLotto showcases how Web3 can feel like Web2. It lowers the entry barrier and helps grow the NERO ecosystem by turning casual users into active participants.