Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provider Token Rate Slippage Configuration #415

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sundayonah
Copy link
Collaborator

@sundayonah sundayonah commented Feb 4, 2025

Description

Implements token-specific slippage control for providers, allowing them to set custom slippage percentages per token. This replaces the hardcoded 0.5% slippage with configurable values, giving providers more precise control over rate fluctuations and margin protection for different currency pairs.

Additionally, test cases have been added to validate slippage behavior, including slippage value range checks and default behavior.

References

n/a

Testing

  • Fails when rate slippage exceeds 20%
  • Succeeds with valid rate slippage (≤ 20%)
  • Defaults to zero slippage when not specified
  • Ensures token-specific slippage is applied during rate matching

Checklist

  • Schema updates for ProviderOrderToken
  • Token handling implementation in UpdateProviderProfile
  • GetProviderProfile response includes slippage data
  • AssignLockPaymentOrder modified to use token-specific slippage
  • Added error logging for edge cases

closes #398

@sundayonah sundayonah changed the title Provider Token Rate Slippage Configuration## Overview Provider Token Rate Slippage Configuration Feb 4, 2025
@sundayonah sundayonah marked this pull request as draft February 4, 2025 15:37
@sundayonah sundayonah marked this pull request as ready for review February 5, 2025 15:24
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.

Add Rate Slippage Per Token for Provider Orders
1 participant