-
Notifications
You must be signed in to change notification settings - Fork 2
Immediate deposit+withdrawal saturates deposit rate limit capacity #265
Copy link
Copy link
Open
Description
Context
FlowALP has a deposit rate limit mechanism (implemented in #63), which limits the total and per-position deposits per hour.
-
When a user makes a deposit, they are limited by this mechanism
- Each hour, a position can deposit at most
$(0.05)(depositCapacityCap)$ (see code)
- Each hour, a position can deposit at most
- When a user makes a withdrawal, this does not impact the available deposit capacity
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
depositCapacityto become greater thandepositCapacityCapwhen freeing deposit capacity
- Need to think about this carefully. Probably we should not allow the
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels