Skip to content

Immediate deposit+withdrawal saturates deposit rate limit capacity #265

@jordanschalm

Description

@jordanschalm

Context

FlowALP has a deposit rate limit mechanism (implemented in #63), which limits the total and per-position deposits per hour.

A user can saturate all deposit capacity, without permanently depositing any funds, with the following workflow:

  • Create 20 positions
  • Deposit (0.05)(depositCapacityCap) into each position, then withdraw all funds. (They can even do this in the same transaction.)
  • The deposit capacity for the deposited token is saturated, and no other users can deposit any tokens for the next hour

Proposed Solution

  • Withdrawals should free deposit capacity
    • Need to think about this carefully. Probably we should not allow the depositCapacity to become greater than depositCapacityCap when freeing deposit capacity

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions