roblox-security-economy

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Roblox Security Economy

Roblox 安全经济系统

Goal

目标

Protect valuable game state while keeping the player loop fair. Anything that grants, spends, trades, saves, or purchases value must be server-authoritative.
保护有价值的游戏状态,同时保持玩家循环公平。任何会授予、消费、交易、保存或购买价值的操作都必须以服务器为权威。

High-Risk Surfaces

高风险领域

  • Currency and premium currency.
  • Inventory, pets, skins, tools, boosts, and quest rewards.
  • Trading, gifting, crafting, upgrades, prestige, and loot rolls.
  • Developer product receipts and game pass checks.
  • Daily rewards, streaks, event rewards, and group rewards.
  • Client remotes that request grants, damage, teleport, placement, or progression.
  • 货币和高级货币。
  • 背包、宠物、皮肤、工具、增益效果和任务奖励。
  • 交易、赠送、制作、升级、prestige 和战利品抽取。
  • Developer Product 收据和 game pass 检查。
  • 每日奖励、连续登录奖励、活动奖励和群组奖励。
  • 会请求发放奖励、造成伤害、传送、放置对象或推进进度的客户端 remote。

Server Authority Rules

服务器权威规则

  • Calculate rewards on the server.
  • Validate player eligibility on the server.
  • Store canonical balances and inventory on the server.
  • Treat client UI as display and intent only.
  • Use idempotency for purchases and valuable grants.
  • Reject malformed, replayed, impossible, or too-frequent remote requests.
  • 在服务器上计算奖励。
  • 在服务器上验证玩家资格。
  • 在服务器上存储权威的余额和背包数据。
  • 仅将客户端 UI 视为展示和意图来源。
  • 对购买和价值发放使用 idempotency(幂等性)。
  • 拒绝格式错误、重复重放、不符合业务逻辑或频率过高的 remote 请求。

DataStore And Receipt Patterns

DataStore 与 Receipt 模式

  • Save compact canonical state, not UI state.
  • Use versioned data schemas and migration guards.
  • Queue or debounce saves during active sessions.
  • Bind saves to player leaving and server shutdown paths.
  • For developer products, grant through receipt processing and record processed purchase IDs before considering the transaction complete.
  • 保存紧凑的权威状态,而非 UI 状态。
  • 使用版本化数据结构和迁移保护机制。
  • 在游戏会话期间对保存操作进行排队或防抖处理。
  • 将保存流程绑定到玩家离开和服务器关闭路径。
  • 对于 Developer Product,通过 receipt 处理发放物品,并在将交易视为完成之前记录已处理的购买 ID。

Trading And Gifting

交易与赠送

  • Use server-owned trade sessions.
  • Lock offered items while a trade is pending.
  • Require both parties to confirm the exact final offer.
  • Revalidate ownership immediately before commit.
  • Commit atomically from server state where possible.
  • Log valuable trades and grant paths for later investigation.
  • 使用由服务器管理的交易会话。
  • 在交易待处理期间锁定所提供的物品。
  • 要求双方确认最终的确切交易内容。
  • 在提交交易前立即重新验证所有权。
  • 尽可能以原子方式基于服务器状态提交交易。
  • 记录高价值交易和发放路径,以便后续调查。

MCP Review Workflow

MCP 审查流程

  1. Use
    script_grep
    for remotes, currency names, DataStore usage, receipt handlers, and grant functions.
  2. Read every script that touches value with
    script_read
    .
  3. Inspect relevant instances with
    search_game_tree
    and
    inspect_instance
    .
  4. Patch with
    multi_edit
    only after mapping source-to-sink flow.
  5. Playtest purchase-free paths and console errors with
    start_stop_play
    and
    get_console_output
    .
  1. 使用
    script_grep
    搜索 remote、货币名称、DataStore 使用情况、receipt 处理器和发放函数。
  2. 使用
    script_read
    读取每个涉及价值的脚本。
  3. 使用
    search_game_tree
    和
    inspect_instance
    检查相关实例。
  4. 仅在梳理清 source-to-sink 流程后,才使用
    multi_edit
    打补丁。
  5. 使用
    start_stop_play
    和
    get_console_output
    对不涉及购买的流程以及控制台错误进行 playtest。

Output

输出

Report:
  • Assets or values protected.
  • Trust boundary.
  • Server validation rules.
  • Abuse cases prevented.
  • Remaining risks or manual Roblox purchase tests.
报告:
  • 已保护的资产或价值。
  • 信任边界。
  • 服务器校验规则。
  • 已阻止的滥用场景。
  • 剩余风险或需要手动执行的 Roblox 购买测试。

Next

下一步

Verify the protected flows in a playtest with
roblox-playtest-qa
, and confirm the save path is safe with
roblox-datastore-persistence
.
使用
roblox-playtest-qa
在 playtest 中验证受保护的流程,并使用
roblox-datastore-persistence
确认保存路径安全。