Economy & Instance Detection Modules

2 Modules

Server-side transaction rate limiting, currency validation, tool duplication, and backpack overflow prevention.

# Overview

In games featuring trading, shops, currency, or inventory systems, cheaters target remotes to duplicate items, trigger race conditions in shops, or spam thousands of tools into their backpack to lag the server.

RAC monitors item lifecycle and currency transactions via:

  1. EconomyTransactionValidator: Enforces transaction cooldowns, limits, and server-generated tokens.
  2. ToolTamperDetector: Audits character Backpack contents and halts unauthorized tool replication.

# 1. EconomyTransactionValidator (EconomyTransactionValidator.luau)

# Key Validations

  • Cooldown Verification: Enforces a minimum interval of $0.5\text{s}$ (MinTransactionIntervalSeconds) between consecutive buy/sell/trade requests. This completely eliminates double-spend and race-condition duplication exploits.
  • Maximum Amount Cap: Rejects transactions exceeding MaxSingleTransactionAmount (default $1,000,000$ coins/gems) to prevent overflow bugs.
  • Server Token Validation: When RequireServerTransactionToken = true, the server generates a one-time cryptographic token (GUID) when opening a shop. Purchases must include this valid token; any reused or missing token is immediately discarded.

# 2. ToolTamperDetector (ToolTamperDetector.luau)

Exploiters frequently attempt to spawn unauthorized weapons or copy tools using local injection scripts.

# Key Validations

  • Backpack Capacity Cap: Enforces a strict limit of $50$ items (MaxBackpackItems) in player.Backpack. Excess items spawned by scripts are instantly deleted on the server.
  • Tool Whitelist Auditing: When configured, the detector checks each Tool parented to the player against the game's registered catalog. Unregistered tools are quarantined and logged.
  • Rapid Equip / Drop Spam: Rapidly parenting tools between Character and Backpack ($>15\text{ cycles/s}$) is intercepted and throttled to prevent physics desyncs.

# Next Steps