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: limit xcm transfers #727

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

sander2
Copy link
Member

@sander2 sander2 commented Oct 10, 2022

This will still needs tests, cleanup, setter extrinsics, etc, but I'm opening this for feedback on the approach.

Currently the approach is to have configurable limits per currency per 24 hours. The "budget" resets every 24 hours (i.e. it is not a sliding window).

This new pallet implements TransactAsset, which is basically a proxy for the existing transactor that records the total amounts sent. We then use the barrier implemented in this pallet to deny messages that cross the limit.

If we hit the limit, new requests of that currency are denied, but then allowed again after the next 24 hour checkpoint.

Thoughts?

}
} else {
match first_instruction {
ReceiveTeleportedAsset(assets) | WithdrawAsset(assets) | ClaimAsset { assets, .. } => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be ReserveAssetDeposited rather than receiveTeleportedAsset

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.

1 participant