[CODE v1.1.0] Optional Feature # 1 - Wallet Exemption to On-chain Tax

Introduction
Given the status of the signaling proposals, we would like to begin the discussion around the software features to be included in the next release (v1.1.0). This discussion is around the implementation of Optional Feature # 1 - Wallet Exemption to On-chain Tax (Binance Request 1/2).

Binance has requested that the internal movement between Binance owned wallets be exempt from the burn tax (currently set to 0.2%). A list of Binance owned wallets has been provided to the community via announcement. It was confirmed with Binance that movement to and from Binance wallets will still be taxed. This means deposits and withdrawals are not exempt, but rather only the internal movements between wallets will be exempt for their internal security purposes. The implementation of this whitelist feature will be parameterized, with the initial list set to the provided Binance list.

Technical Code Description

Please see the following for the code that will be included for this feature.

We introduce new logic within the burn Antehandler method. When a transaction is processed, the message type is selected. Send messages, and multisend messages can be exempt from the burn tax. The sufficient criteria is that both the sender and recipient must be in the list of exempt addresses. If this is the case, the burntax antehandler does not withdraw the tax and continues forward in processing the transaction. If this condition is not met, the message is taxed as normal.

Note: Both the sender and receiver addresses must be included in the exemption list to be exempt from the taxes.

Test Results

TestFilterRecipient:

Test Msgs for various cases:

  • MsgSend(binance → binance)
  • MsgSend(normal → normal)
  • MsgSend(binance → normal), MsgSend(binance → binance)
  • MsgSend(binance → binance), MsgMultiSend(binance → normal, binance → binance)

Send Msg to BurnTaxFeeDecorator
Check amount burn before and after
Check community pool before and after
Check FeeCollector before and after

Tax Exemption List Governance Test:

  • Create a node
  • Make a gov to add addresses to Tax Exemption List
  • Check if tax exemption list has those addresses

Upgrade check: Make sure that state migration in x/treasury module works and Binance addresses are added to Tax Exemption List

Governance Parameters

This is a new type of proposal (different from a parameter change proposal) that adds and removes addresses from a tax exemption list.

AddBurnTaxExemptionAddressProposal

type AddBurnTaxExemptionAddressProposal struct {
	Title            string     // Title of the Proposal
	Description      string     // Description of the Proposal
	ExemptionAddress []string   // List of addresses to be added to tax exemption
}

Example JSON

{
  "type": "treasury/AddBurnTaxExemptionAddressProposal",
  "value": {
    "title": "proposal title",
    "description": "proposal description",
    "exemption_address": ["terra1dczz24r33fwlj0q5ra7rcdryjpk9hxm8rwy39t","terra1qt8mrv72gtvmnca9z6ftzd7slqhaf8m60aa7ye"]
  }
}

RemoveBurnTaxExemptionAddressProposal

type RemoveBurnTaxExemptionAddressProposal struct {
	Title            string     // Title of the Proposal
	Description      string     // Description of the Proposal
	ExemptionAddress []string   // List of addresses to be removed from tax exemption
}

Example JSON

{
  "type": "treasury/RemoveBurnTaxExemptionAddressProposal",
  "value": {
    "title": "proposal title",
    "description": "proposal description",
    "exemption_address": ["terra1dczz24r33fwlj0q5ra7rcdryjpk9hxm8rwy39t","terra1qt8mrv72gtvmnca9z6ftzd7slqhaf8m60aa7ye"]
  }
}
7 Likes

Thanks - nice work! :slight_smile:

2 Likes

Nice.

1 Like

Is it possible to include contract addresses for tax exemption?

yes see here, feat: add burn tax exemption list (#107) · classic-terra/core@ea02007 · GitHub

1 Like

thanks! and what would be the process of excluding a smart contract from taxes?

say for example if I wanted to add LUNC-UST swap contract from terraswap (terra1l7vy20x940je7lskm6x9s839vjsmekz9k9mv7g) to the exemption list - do I just create a PR here: core/migrations.go at main · classic-terra/core · GitHub with the contract address and create a text proposal for governance vote for merging the PR?

MsgExecutes were not a part of the original implementation. What ever happened to the exclusion of all contracts from the tax? Wasn’t the impact only like 2%?

yeah the impact is not much but the possibility of it creating a loophole in the burn tax exists, as also pointed out by a terraswap team member here: [Proposal] Exclude Smart Contraction Transactions from the scope of Burn Tax - #69 by terraswap_io

whitelisting contract executions seems like a better option from an implementation perspective. is this something that can be considered in the next release?

Ustc should be the main gas.
All transaction fees ( gas )on chain must use ustc.
To be fair and balanced.
$lunc function as a validator.
$ustc function as a gas.
so that there is a clear reason why I bought ustc.

2 Likes

@ek826 Is there a way to view all the exempted wallet addresses currently configured in the chain?

not sure if ek is still working - tagging @LuncBurnArmy

1 Like

Adding @fragwuerdig, @nghuyenthevinh2000 as well in case they know…

I’ve got word from @ek826.

The exempted wallet addresses can be seen in the publicnode endpoints here
or the TR endpoints here.

1 Like