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

SLP cross chain fee cause lack of vToken reserve #1649

Merged
merged 3 commits into from
Feb 7, 2025
Merged

SLP cross chain fee cause lack of vToken reserve #1649

merged 3 commits into from
Feb 7, 2025

Conversation

yooml
Copy link
Contributor

@yooml yooml commented Feb 6, 2025

Currently, when SLP performs transfer back operation to transfer custodial assets back to the Bifrost network, the Bifrost network will charge a token as a cross-chain handling fee when entering Bifrost. This leads to the actual number of tokens hosted regularly causing certain losses. This part of the loss is not reflected in the SLP's operating logic (actual token decreases, token pool does not decrease). This leads to the gap between the number of long-term running token pools and the number of actually managed tokens gradually accumulate and grow, resulting in a relatively insufficient reserve of continuous vTokens.

Reform the chargeHostFeeAndTuneVtokenExchangeRate method to enable actual correction of the value of the Token pool when making exchange rate adjustments without affecting the correctness of the ledger:

  • Split the value value parameter of the adjusted exchange rate into two parameters:
  1. pool_value: This value is used to up-regulate the tokenPool value during execution (determines the exchange rate)
  2. delegator_value: This value is used to up-regulate the delegator ledger value during execution.
  • During the execution process, the corresponding on-chain parameters are independently adjusted based on two incoming parameters.
  • Both parameters are limited by the original security parameters
  • Only positive numbers can be set (can only increase but not decrease)
  • A vToken cycle can only perform adjustments with limited parameters
  • Each adjustment can only adjust the maximum value of the maximum percentage set based on the total amount of tokenpool

@yooml yooml changed the title Fix slp SLP cross chain fee cause lack of vToken reserve Feb 6, 2025
@ark930 ark930 merged commit c83570b into v0.17.0 Feb 7, 2025
1 check passed
@ark930 ark930 deleted the fix-slp branch February 7, 2025 03:11
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.

2 participants