Skip to content
This repository was archived by the owner on Aug 1, 2025. It is now read-only.

Conversation

@julio4
Copy link
Member

@julio4 julio4 commented Dec 12, 2024

Issue(s): Close #230

Description

Account Contract with Spending Limits for any ERC20 token.

@julio4
Copy link
Member Author

julio4 commented Dec 17, 2024

We need to figure out the best way to correctly track allowance and spending:

When counting spending against a limit, there are two operations to track:

  • approve: Allows another address to spend tokens
  • transfer/transferFrom: Actually moves the tokens

Issues:

  • An approval might never be spent (user approves 100 tokens but spender never uses them), but because of transferFrom we want to count it towards the spending limit (as we have no way to add our custom blocking logic when another contract call transferFrom with allowance).
  • The same tokens should not be counted twice (user approves 100 then transfers 100 - shouldn't count as 200 towards the limit)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant