Start here: most of the app is just REST
The single most useful thing to know about integrating YouthChain: the social product runs entirely on normal HTTP. Engagement, rewards, profile, leaderboard, device fleet — all of it isfetch, JSON in, JSON out, no keys, no signing, no blockchain concepts at all.
So the chain-specific work is confined to the wallet screens. Everything else you can build
the way you build any product. If you are planning the work, that is where the estimate
belongs.
The one rule that explains everything else
A write is a signed message that the network executes later, not a request the server performs now. Every difference below falls out of that sentence.The six things to actually learn
1. Address and private key — there is no login
An address (0x4444…) is an account. A private key is what proves you control it.
There is no registration, no password reset, no “forgot my account”. The key never leaves the
device and never goes to any server.
Practical consequence: your onboarding must create a key and make the user back up the
recovery phrase, because losing it loses the account. See
Wallet Integration.
2. Nonce — a per-account counter that orders your writes
Every account has a counter. Transaction #7 cannot execute before #6. You read it right before signing:3. Gas — writes cost money, reads are free
Executing costs gas, paid in the native token. On this testnet the price is fixed at 1 gwei and the faucet drops 0.1 YCE, which covers hundreds of transactions.- Reads (
eth_call,eth_getBalance, anyGET) cost nothing and are instant. - Writes cost gas and take a block.
4. Native YCE vs YCE token — the trap of this chain specifically
YCE exists in two separate places, and they are not the same balance.
A user can hold 11,000 YCE tokens and still be unable to send a transaction, because gas is
paid only by the native balance. Show them as two lines in the UI. Reading one and
labelling it “your YCE” will produce support tickets.
YCR is simpler — it only exists as a token — but it has its own pair:
- pending YCR: earned by engagement, accrued inside the rewards contract. Read it at
GET /api/mobile/rewards/:address. - YCR balance: real ERC-20, after a claim. Read it with
balanceOf.
5. Amounts are integers with 18 decimals — and they overflow JavaScript
On-chain amounts have no decimal point.1 YCE is 1000000000000000000 (10¹⁸).
Number.MAX_SAFE_INTEGER is about 9×10¹⁵ — smaller than one whole token. Use BigInt
everywhere, convert to string for display only, and never do arithmetic on the formatted
value.
6. The receipt is the real answer
Sending a transaction gives you a hash immediately. That means “accepted”, not “worked”.400, and it arrives as a successful HTTP
response with status: 0 inside. If your code only checks that the HTTP call worked, you
will report success for a transfer that never happened.
See Events & confirmations for cadences and the
WebSocket alternative.