YCR is the rewards token users earn by being active on the network — every Post, Like, Share, Comment, Watch, NftCreate or Tip recorded by the EngagementOracle accumulates pending YCR for the actor. Users claim it from YCRRewards whenever they want.

Standard ERC-20

All standard methods work as expected:

Claim flow

The interesting bit is the pending YCR mechanism. Engagement actions don’t mint YCR immediately — they accumulate into pendingByAction[user][type]. The user claims it at their convenience:

previewClaim(address user, uint8 activeActionTypes) view returns (uint256)

How much YCR the user would receive if they called claim right now. activeActionTypes is a bitmask: include action n by setting bit n.

claim(uint8 activeActionTypes) returns (uint256)

User burns their pending into a real YCR balance. Call from the user’s own wallet.

claimFor(address user, uint8 activeActionTypes) returns (uint256)

Same as claim but called by an authorized minter on behalf of the user. The EngagementOracle is typically the minter for batch claim flows.

Indexer convenience endpoints

Instead of calling previewClaim directly, mobile apps can use:
  • GET /api/mobile/rewards/:address — returns YCR balance + pending breakdown by action type
  • POST /api/mobile/claim — server-side claim helper (testnet convenience)

Integration tip

If you’re showing the user “today’s earnings” in the app UI, don’t trigger an on-chain claim on every page load. Instead:
  1. Read previewClaim() to display “Your pending YCR: X”
  2. Show a “Claim now” button
  3. Only call claim() when the user taps the button
This keeps gas usage and chain noise low.