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

Optimize asset management for bonding and unbonding #128

Closed
mattsse opened this issue Jun 17, 2021 · 0 comments · Fixed by #152
Closed

Optimize asset management for bonding and unbonding #128

mattsse opened this issue Jun 17, 2021 · 0 comments · Fixed by #152
Assignees
Labels
p3 Medium Priority

Comments

@mattsse
Copy link
Contributor

mattsse commented Jun 17, 2021

Issue summary

Initially (un)bond xcm calls were intended to be executed for each deposit/withdrawal. However this has several downsides:

  • it's inefficient with high Tx volume to execute a single xcm for each trade.
  • especially unbonding is limited to 32 concurrent unlocked chunks before funds have to be withdrawn with withdraw_unbonded. Also incoming DOT deposits (bond) and DOT redemptions (unbond) would cancel each other out constantly.

This could be improved so that the PINT chain keeps a certain amount of stash (free balance) on the relay chain to cover final withdrawals. Since we keep track of the free balance and staked amount we can should only be required to unbond if a certain threshold of redemptions/stash is reached.

Other information and links

@mattsse mattsse added the needs triage Issue needs to be triaged label Jun 17, 2021
@mattsse mattsse self-assigned this Jun 17, 2021
@mattsse mattsse added p2 High Priority p3 Medium Priority and removed needs triage Issue needs to be triaged p2 High Priority labels Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3 Medium Priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant