Skip to content

Rate limiting per address #576

@nafiuishaaq

Description

@nafiuishaaq

Description:
Implement rate limiting to prevent spam or DoS attacks by limiting how many sessions a single address can create within a time window.

Acceptance Criteria:

set_rate_limit(max_sessions: u32, window_ledgers: u32) admin function.

Track UserSessionCount(address, timestamp_window) in temporary storage.

lock_funds checks if buyer has exceeded limit in current window.

Rate limit resets after window_ledgers passes.

Emits RateLimitHit event when limit exceeded (for monitoring).

Admin can whitelist specific addresses (no rate limit).

Labels: security, rate-limiting, anti-dos

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions