Skip to content

💰 Gas Subsidy Abuse Detection #57

@mijinummi

Description

@mijinummi

📌 Overview

Gas subsidies allow relayers or sponsors to cover transaction fees for users. Without monitoring, malicious actors can exploit these subsidies, draining sponsor wallets and compromising system sustainability.

This task introduces a Gas Subsidy Abuse Detection System to enforce usage limits and monitor per-wallet activity, protecting relayer funds.


🎯 Objective

Build a monitoring and control system that:

  • Enforces gas subsidy caps per wallet or user
  • Monitors real-time subsidy consumption
  • Detects and flags suspicious or excessive usage
  • Ensures relayer wallets are protected from abuse

🛠 Scope of Work

Subsidy Cap Logic

  • Define configurable caps per wallet or plan tier:
    • Maximum gas per transaction
    • Daily / weekly / monthly gas allowance
  • Reject transactions exceeding the cap
  • Example response for cap exceeded:
{
  "error": "SubsidyLimitExceeded",
  "message": "This wallet has exceeded its gas subsidy limit."
}

API & Reporting
Endpoints to check subsidy status and usage:
GET /subsidy/:wallet/status
GET /subsidy/:wallet/usage

### Acceptance Criteria
1. Gas subsidy caps correctly enforced per wallet
2. Usage monitored and logged in real time
3. Suspicious or abusive patterns detected accurately
4. Reporting endpoints functional and secure
5. Multi-chain support operational
6. Documentation updated
7. All tests passing

Metadata

Metadata

Assignees

Labels

Nest.jsStellar WaveIssues in the Stellar wave programbackendNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions