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

feat: implement staking related (un)bonding xcm calls #119

Merged
merged 19 commits into from Jun 17, 2021

Conversation

mattsse
Copy link
Contributor

@mattsse mattsse commented Jun 17, 2021

Changes

  • Allows dispatching staking pallet related calls based on the asset's location
  • These are currently called every time a user redeem's asset's that support staking, 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 unbonnd chunks before funds have to be withdrawn with withdraw_unbonded

This should be improved so that the PINT chain keeps an always certain amount of stash, only if the set of pending redemptions reached a certain limit, a unbond will be send.
Also cross chain deposits and withdrawals also cancel each other out, so it might not even necessary to actually send an unbond call before a huge disparity (withdrawals >> deposits) forces us to unbond staked funds

Tests

Currently looking into setting up testing support for all cross chain stuff.

Issues

@mattsse mattsse added the needs review PR needs reviewing label Jun 17, 2021
@mattsse mattsse requested a review from clearloop June 17, 2021 10:38
@dutterbutter dutterbutter added approved PR approved to merge and removed needs review PR needs reviewing labels Jun 17, 2021
@mattsse mattsse merged commit 9ae2ae5 into main Jun 17, 2021
@mattsse mattsse deleted the matt/add-asset-bonding branch June 17, 2021 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved PR approved to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement unbond API call Implement bond API call
3 participants