Common On‑Chain Actions
Smart contracts are like tiny economies—they mint, spend, lock, and send value.
In a Focus2Earn‑style contract, minting simply means increasing a stored balance:
No one sends these points manually—they are created by your contract logic when conditions are met.
Spending is the opposite: you check that a user has enough points, then reduce their balance.
Nice! This pattern is everywhere: games, loyalty apps, and reward systems on VeChain.
You can also lock actions behind time conditions, like a cooldown:
Think of this like a timer in a game: users must wait before claiming again, enforced entirely on‑chain.
Finally, sending moves tokens from the contract to users:
You can wire any condition you like before this line: proofs, completions, or verifications.
Common Pitfalls
Forgetting checks before spending or sending can break invariants and open exploits.
Keep it up, champ! You master how typical dApps use the same four building blocks for rewards, payments, and access control.
Join our Telegram