Skip to content

Add minimum deposit USD validation#334

Open
Tomoya0k wants to merge 1 commit into
SO4-Markets:mainfrom
Tomoya0k:fix-min-deposit-usd
Open

Add minimum deposit USD validation#334
Tomoya0k wants to merge 1 commit into
SO4-Markets:mainfrom
Tomoya0k:fix-min-deposit-usd

Conversation

@Tomoya0k

Copy link
Copy Markdown

Closes #279

Summary

Adds an admin-configurable minimum deposit USD threshold per market.

Changes

  • Added min_deposit_usd_key(market)
  • Added get_min_deposit_usd and set_min_deposit_usd to data_store
  • Added BelowMinimumDeposit
  • Validates deposit USD value using current oracle prices before vault transfers
  • Keeps minimum 0 as no minimum
  • Records deposit vault transfer-in after successful token transfers

Tests

  • Deposit below 100 USD reverts before vault transfer
  • Deposit exactly 100 USD succeeds
  • Minimum deposit of 0 allows small deposits
  • Existing deposit-handler tests pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: configurable minimum deposit size to prevent dust LP positions

1 participant