ShanHaiVerse - Divine Image Project
Bridging ancient mythology with Web3 through AI
Created on 2nd June 2025
•
ShanHaiVerse - Divine Image Project
Bridging ancient mythology with Web3 through AI
The problem ShanHaiVerse - Divine Image Project solves
Traditional NFT projects have a dirty secret - most rarity systems are rigged. Project creators can manipulate which wallets get rare items, or change odds after launch. We've all heard the stories.
I wanted to create something different. Growing up reading ancient Chinese texts like Shan Hai Jing, I was fascinated by these incredible mythical creatures that most people have never heard of. But there was no easy way to visualize them or share them with others.
That's where ShanHaiVerse comes in.
The Real Problems We Solve
Unfair NFT Distribution
Every crypto collector has been burned by suspicious rarity drops. With Chainlink VRF, the randomness is generated on-chain and completely verifiable. No backdoors, no insider trading, no "oops we made a mistake" explanations.
Cultural Gap
These amazing creatures from Shan Hai Jing - like the nine-tailed fox or the cosmic bird Kunpeng - deserve to be known globally. But who's going to commission hundreds of professional artworks? AI makes this possible at scale.
Barrier to Entry
Most people can describe their dream mythical beast but can't draw it. We flip this around - describe it in plain English, and our AI brings it to life. No Photoshop skills required.
Trust in Digital Collectibles
When you mint an NFT on our platform, you can literally verify on Etherscan that the randomness came from Chainlink's VRF coordinator. The smart contract code is open source. Everything is transparent.
Who Benefits
- Collectors get genuinely fair drops they can verify themselves
- Culture enthusiasts discover amazing mythology they never knew existed
- Artists get inspiration from AI interpretations of ancient texts
- Developers see a working example of truly fair randomness in practice
The bigger picture? We're proving that Web3 can preserve and modernize cultural heritage while maintaining the transparency and fairness that blockchain promises.
No more "trust us" - everything is verifiable on-chain.
Challenges we ran into
Oh boy, where do I start? This project was basically a masterclass in "everything that could go wrong, did go wrong."
The Chainlink VRF Nightmare
Setting up VRF was my first real headache. The documentation makes it sound simple, but when you're actually implementing it? Different story. I spent three days debugging why my VRF requests weren't going through, only to realize I had the wrong gas limit. 200,000 wasn't enough - had to bump it up and lost some test ETH in the process.
Then there was the subscription management. Getting LINK tokens on Sepolia, funding the subscription, adding my contract as a consumer... I probably redeployed my contract 15 times because I kept messing up the coordinator address or subscription ID.
AI API Integration Hell
ZhipuAI's documentation is mostly in Chinese, which was... challenging. Google Translate only gets you so far when you're trying to understand rate limits and image generation parameters. I burned through my API credits twice because I didn't realize their timeout was so aggressive.
DeepSeek was more straightforward, but their prompt optimization sometimes returned results that were too long for my UI. Had to add truncation logic that I definitely should have planned for upfront.
IPFS Upload Chaos
Pinata was supposed to be the "easy" part. Wrong. Their API occasionally times out when downloading images from ZhipuAI's CDN (which is what we just fixed by rolling back). Spent hours debugging network timeout issues that turned out to be completely random.
I also initially tried to upload metadata and images separately, which created race conditions. Sometimes the image would upload but the metadata would fail, leaving orphaned files. Had to restructure the whole upload flow to be atomic.
Frontend State Management Disasters
React state management across the minting flow was a nightmare. Users could click "mint" multiple times before the first transaction completed, creating duplicate VRF requests. Had to add loading states everywhere and disable buttons at just the right moments.
The wallet connection detection was also buggy - sometimes users would appear connected but the contract calls would fail. Turned out MetaMask sometimes reports connected accounts before the network switch is complete.
What Actually Worked
Honestly? Brute force debugging and a lot of console.log statements. Also, the Chainlink Discord community was incredibly helpful when I got stuck on VRF implementation details.
The rollback strategy we just used saved my life - keeping git history clean enough to revert when things broke was probably the smartest thing I did during this whole project.
Lessons Learned
Test on Sepolia early and often. Don't assume API timeouts are your fault (sometimes they're just flaky). And always, ALWAYS have a working version you can roll back to when you're close to a deadline.
Also, Next.js API routes have their own timeout limits that are different from your fetch timeouts. Found that one out the hard way.
Tracks Applied (2)
Onchain Finance
Best Use of ElizaOS
ElizaOS
