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: daily bridge transfer limits #1198

Merged

Conversation

maharifu
Copy link
Contributor

Related Github tickets

Background

Add a limit to the amount of tokens transferred out from paloma within a specified window, per token. This is defined by a new governance vote.

  • Add governance vote. Can define token, window size, token limit and list of exempt addresses.
  • Keep a counter of the number of tokens transferred and the block height at the start of the limiting window.
  • Before accepting a transfer, update the counters and check the limits.
  • Transfers are refused if over the transfer limit.

Testing completed

  • test coverage exists or has been added/updated
  • tested in a private testnet

Breaking changes

  • I have checked my code for breaking changes
  • If there are breaking changes, there is a supporting migration.

@maharifu
Copy link
Contributor Author

@taariq @byte-bandit I assumed we want to update/check the counters when adding the transfer to the queue, and will not decrease the counters even if the transfer fails or is cancelled afterwards.

@maharifu maharifu marked this pull request as ready for review June 20, 2024 14:25
@taariq
Copy link
Contributor

taariq commented Jun 20, 2024

@maharifu correct. No need to decrease the counters on cancellation. All good.

@taariq
Copy link
Contributor

taariq commented Jun 20, 2024

@byte-bandit your review? Let's merge this in!

byte-bandit
byte-bandit previously approved these changes Jun 21, 2024
Copy link
Contributor

@byte-bandit byte-bandit left a comment

Choose a reason for hiding this comment

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

Good stuff. Some small input, but non-blocking. Up to you.

proto/palomachain/paloma/gravity/query.proto Outdated Show resolved Hide resolved
x/gravity/client/cli/query.go Outdated Show resolved Hide resolved
@maharifu maharifu force-pushed the lcarvalho/1711-daily-bridge-limits branch from e1a71fc to b182f7f Compare June 21, 2024 10:52
@maharifu maharifu merged commit d25836d into palomachain:master Jun 21, 2024
4 checks passed
@maharifu maharifu deleted the lcarvalho/1711-daily-bridge-limits branch June 21, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants