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

[api] Make the limit on spending power on the retire API configurable per team #2278

Open
biwano opened this issue Feb 16, 2024 · 0 comments
Labels
carbonmark-api dashboard Developer Dashboard for CM API dev Work related to engineering LOW PRIORITY

Comments

@biwano
Copy link
Collaborator

biwano commented Feb 16, 2024

Users of the retirement API can decide on a limit on spending power per week in the limit of 5000 USDC per key.
We want to add a limit on the overall spending power of a team controlled by Carbonmark.

Describe the solution you'd like

  • Add a limit_cost_usdc_per_week in the team database with a default value of 5000
  • Add a trigger that prevent modifying this value by non admins.
  • Add a check in the retire endpoint that checks:
    Total spent by all the keys during the last week + Cost of the new trasaction < team.limit_cost_usdc_per_week
@biwano biwano added dashboard Developer Dashboard for CM API dev Work related to engineering labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
carbonmark-api dashboard Developer Dashboard for CM API dev Work related to engineering LOW PRIORITY
Projects
Status: No status
Development

No branches or pull requests

2 participants