astroport-fi / astroport-core

Astroport DEX core contracts
https://astroport.fi/
GNU General Public License v3.0
153 stars 104 forks source link

feat: Add contract astroport-pair-xyk-sale-tax #381

Closed apollo-sturdy closed 9 months ago

apollo-sturdy commented 1 year ago

This contract is a copy of the standard XYK pair but adds a configurable tax on swaps.

After launching the APOLLO token, Apollo DAO will be submitting a proposal to migrate standard xyk pair to this contract. If the proposal passes, perhaps it makes sense to merge it into the main astroport-core repo.

epanchee commented 1 year ago

Hi @apollo-sturdy

Isn't this recently added feature does the same thing? https://github.com/astroport-fi/astroport-core/blob/6c753c41e72ef5ea60bfa3363657bbc6e775f72d/contracts/pair/src/contract.rs#L695-L718

apollo-sturdy commented 1 year ago

Hi @apollo-sturdy

Isn't this recently added feature does the same thing?

Thanks for mentioning this, I wasn't aware of this change. However, this doesn't seem to allow us to accomplish what we want. There are a few differences:

donovansolms commented 12 months ago

Looks good - I have nothing to add.

I hope that tax_config_admin would be some governance address and not a multisig that would allow silent rugging of everyone that swaps via this pool. If it is, I'd much rather have stricter limits on what the tax can be set to.