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

Whitelisting (tax exemption) feature according to prop #11824 #388

Closed
wants to merge 23 commits into from

Conversation

StrathCole
Copy link
Collaborator

@StrathCole StrathCole commented Nov 28, 2023

Summary of changes

Introduce zone-based tax exemption.
Zones are always tax-free internally.
Optionally they can be set to be tax-free for incoming and/or outgoing txs.
Cross-Zone transactions are always taxed, unless cross-zone exemption is also set for the zone

Report of required housekeeping

  • Github issue OR spec proposal link
  • Added Binance whitelist migration
  • Wrote tests
  • Updated API documentation (client/lcd/swagger-ui/swagger.yaml)
  • Added a relevant changelog entry: clog add [section] [stanza] [message]

(FOR ADMIN) Before merging

  • Added appropriate labels to PR
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)
  • Confirm added tests are consistent with the intended behavior of changes
  • Ensure all tests pass

x/taxexemption/keeper/test_utils.go Dismissed Show dismissed Hide dismissed
x/taxexemption/keeper/test_utils.go Dismissed Show dismissed Hide dismissed
x/taxexemption/keeper/test_utils.go Dismissed Show dismissed Hide dismissed
@StrathCole
Copy link
Collaborator Author

One thing to note. I removed the old "contract" handling of whitelisting as the implementation made no sense. For a contract to be whitelisted, it needed to be added to the "Binance" zone. Also it didn't whitelist the contract (from my understanding) as intended, it just made sure the address needed to be a contract.

With this zone-approach contracts should now be able to be whitelisted as originally intended (incoming/outgoing = true).

@StrathCole
Copy link
Collaborator Author

For clarity here is the scheme I got sent of how it should work:

grafik
The "Exchanges" here are the "zones" in the implementation. The arrows represented the minimum necessary options (optional tax-exempt for incoming), optional exempt for outgoing / cross-zone was added for flexibility.

@StrathCole
Copy link
Collaborator Author

I would close this in favor of #393 if you agree @fragwuerdig ?
the new one uses gov v1 with legacy fallback, so should be less work to convert later.

@fragwuerdig
Copy link
Collaborator

👌

@StrathCole StrathCole closed this Mar 11, 2024
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.

2 participants