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

CHIP-0003: Minimum Transaction Fee #13

Closed
wants to merge 6 commits into from
Closed

CHIP-0003: Minimum Transaction Fee #13

wants to merge 6 commits into from

Conversation

danieljperry
Copy link
Contributor

This is a draft proposal to add a minimum fee to Chia's full nodes.


1. Do nothing. This would maintain the status quo and avoid the aforementioned drawbacks, but we feel the benefits of this CHIP still make it worth implementing

2. Censor the dust stormer. This proposal was a non-starter. Censorship is anathema to the ethos of Chia's blockchain. Additionally, it would break the Sybil-resistance guarantees of Chia's protocols
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we have to add that we couldn't do it even if we wanted to as it is technically infeasible.

hoffmang9
hoffmang9 previously approved these changes May 18, 2022
Copy link
Member

@hoffmang9 hoffmang9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Superseded-By | none

## Abstract
This CHIP will add a minimum, adjustable fee to the design of Chia's full node. The full nodes that choose to implement this feature will ignore any transactions which do not meet a minimum fee threshold.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore transactions in the mempool, but not ignore transactions that were already farmed (in blocks), Might want to clarify


* **Challenge 1:** The fact that there is no minimum fee makes Chia's blockchain susceptible to dust storms, where a user spends many coins worth as little as one mojo (often referred to as "dust"). This is not considered an attack on Chia's network because the "dust stormer" is using the network within the bounds of its design. However, this _is_ an attack on individual users:
* Several users' wallets have become filled with thousands of dust coins. These coins have almost no value -- even a million mojos is worth significantly less than one US cent. Such wallets have long transaction histories, which slows syncing and makes record-keeping cumbersome
* Users who wish to send non-dust transactions often don't know how big of a fee to include. If they don't add a fee, their transaction might require an hour or more to be accepted. If they include a large fee, their transaction will be accepted quickly, but the fee might have been orders of magnitude higher than it needed to be
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not really solved by adding a min fee. if anything it makes it more confusing for the user

* Several users' wallets have become filled with thousands of dust coins. These coins have almost no value -- even a million mojos is worth significantly less than one US cent. Such wallets have long transaction histories, which slows syncing and makes record-keeping cumbersome
* Users who wish to send non-dust transactions often don't know how big of a fee to include. If they don't add a fee, their transaction might require an hour or more to be accepted. If they include a large fee, their transaction will be accepted quickly, but the fee might have been orders of magnitude higher than it needed to be

* **Challenge 2:** In the medium term, as Chia's network grows in popularity, transaction fee pressure is expected to mount. This will naturally result in a minimum fee to use the network. If this CHIP has not been implemented by that point, then zero-fee transactions could get stuck in the mempool indefinitely
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

transactions don't get stuck in the mempool, they either go in the block, or they get kicked from the mempool.
Also, this is not solved by adding a min fee, since wallets might still try to send low fee txs.
This is solved by adding a "replace by fee" feature and a "fee estimation" feature.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the chain supports RBF but we have not implemented UI for it.


2. **Pool Operators**
* **Drawback**: Large pools typically send frequent payments to their farmers. If they need to add a fee to each of these payments, they might not be able to justify making them as frequently
* **Rebuttal**: We intentionally set the minimum fee to be quite low. It will cost around 2 million mojos per payment, which equates to $0.000078 at the current exchange rate of $39 per XCH. This should be sufficiently cheap for pools to make regular payments to their customers, even those with small farms
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems too low. It's about $150 per day to spam:
0.000078 * 2000 tx/block * 1000 txblocks
I would increase this maybe 10x


3. **Wallet Developers**
* **Drawback**: Wallet developers will be recommended to update their implementations to take the new minimum fees into account. If this CHIP is accepted and wallets choose not to enforce minimum fees, then users' transactions might not make it into the mempool, leading to end user frustration
* **Rebuttal**: Even if this CHIP were not implemented, a fee market is expected to emerge on Chia's blockchain in the medium term. Wallets will need to add logic to calculate a minimum fee regardless of the status of this CHIP
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the user will immediately see that the TX was rejected

* Typical CLVM cost per 1-input, 1-output vanilla transaction = `11 000 000 000 / 2000` = `5 500 000`
* Mojos per million cost required to achieve a `1 000 000` mojo minimum fee = `(1 000 000 / 5 500 000) * 1 000 000` = `181 818`

We can also estimate the fees required for pools to pay their customers. The transactions would likely require two outputs (one coin for the receiver and one for "change"), so the CLVM cost would be higher than what was calculated above. We can use a conservative estimate of 1000 transactions per block.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pool payous are batched so they contain only 1 ouput per user

@danieljperry
Copy link
Contributor Author

@mariano54 I have updated the CHIP, taking all of your suggestions into account.

@bhenhsi bhenhsi added this to Draft in CHIPs Backlog Jun 7, 2022
@wriches wriches changed the title Chip 0003 -- min fee CHIP-0003 - Minimum Transaction Fee Jun 15, 2022
@wriches wriches changed the title CHIP-0003 - Minimum Transaction Fee CHIP-0003: Minimum Transaction Fee Jun 15, 2022

### Drawbacks and Rebuttals
1. **New Users and Faucets**
* **Drawback**: One mojo is required to create a singleton for pooling. New users can acquire _some_ mojos from faucets, but they might not receive a sufficient amount to pay a transaction fee for pool participation
Copy link

@Hadamcik Hadamcik Jun 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if this minimum fee change also supported X zero-fee transactions per sender address every Y blocks and whitelisting sender address.

  • X per Y would allow people to set up/change DIDs, plotnfts, etc. for free and still prevent dust storms (I'm not sure about performance)
  • whitelisting would allow farmers to support specific senders (like faucets) in their activity without paying a fee

@lsp0110psl
Copy link

lsp0110psl commented Dec 10, 2022

I removed my initial VWAP (Volume Weighted Average Price) suggestion for adjusting minimum fee, because now I see complications in determining fair prices:

1[Fake Pricing]: There is no best-price-first-execution rule (direct offers and separate exchanges circumvent this rule).

2[Fake Volume]: Since the duster can amplify volume by sending excess trades back and forth between controlled wallets (direct offers), this extra volume would distort VWAP.

If it becomes possible to use data from a Decentralized Exchange (implicitly using a best-price-first-execution rule), then fair pricing can be statistically determined (by VWAP or other methods) and used to adjust the minimum fee.

The Best Execution Rule is used in the conventional markets. It is reasonable to consider whether a similar rule will apply to DeFi crypto in the future.

https://www.investopedia.com/terms/b/bestexecution.asp

https://en.wikipedia.org/wiki/Best_execution

@danieljperry
Copy link
Contributor Author

I removed my initial VWAP (Volume Weighted Average Price) suggestion for adjusting minimum fee, because now I see complications in determining fair prices:

1[Fake Pricing]: There is no best-price-first-execution rule (direct offers and separate exchanges circumvent this rule).

2[Fake Volume]: Since the duster can amplify volume by sending excess trades back and forth between controlled wallets (direct offers), this extra volume would distort VWAP.

If it becomes possible to use data from a Decentralized Exchange (implicitly using a best-price-first-execution rule), then fair pricing can be statistically determined (by VWAP or other methods) and used to adjust the minimum fee.

The Best Execution Rule is used in the conventional markets. It is reasonable to consider whether a similar rule will apply to DeFi crypto in the future.

https://www.investopedia.com/terms/b/bestexecution.asp

https://en.wikipedia.org/wiki/Best_execution

Thanks for adding these thoughts. This CHIP was not popular and likely won't be implemented. But I'm not quite ready to withdraw it just yet.

…nant

Signed-off-by: danieljperry <d.perry@chia.net>
Copy link
Member

@hoffmang9 hoffmang9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@KryptomineCH
Copy link

KryptomineCH commented Jan 17, 2023

I disagree with this proposal to implement a minimum fee on Chia's blockchain because it goes against the principles of a free market and is an unnecessary intervention into the current functioning system. The current design with variable fees is a self-balancing system, and as adoption increases, the issue of dust storms will naturally resolve itself through higher fees. Additionally, implementing a minimum fee artificially limits the capabilities of the blockchain and may discourage legitimate usage and negatively impact the attractiveness of the blockchain to users.

Furthermore, this minimum fee could disproportionately affect small transactions and micropayments, making it less accessible for individuals, smaller businesses and startup projects.

@lsp0110psl
Copy link

lsp0110psl commented Jan 20, 2023

I disagree with this proposal to implement a minimum fee on Chia's blockchain because it goes against the principles of a free market and is an unnecessary intervention into the current functioning system. The current design with variable fees is a self-balancing system, and as adoption increases, the issue of dust storms will naturally resolve itself through higher fees. Additionally, implementing a minimum fee artificially limits the capabilities of the blockchain and may discourage legitimate usage and negatively impact the attractiveness of the blockchain to users.

Furthermore, this minimum fee could disproportionately affect small transactions and micropayments, making it less accessible for individuals, smaller businesses and startup projects.


Even if the proposal is withdrawn, the discussion has been useful.  I see
commits on Github making improvements to the mempool optional fee 
estimator, which (as it is optional,) does not impede or add friction to the 
market.

I did not commit to being for or against this proposal; I only suggested 
ways to make it more fair should a minimum fee be enforced.

Having good data for statistically-determined recommended minimums 
should be sufficient IMHO.  I am currently a non-contributing observer.  
Thank you for considering my point of view.

To restate a further refinement: at some point it would be useful to get 
data-feeds from DeFi Exchanges that are trusted to execute at best-price-first 
(XCH <-> Stable Coins), since it will be a common use case for many to convert 
to a Stable Coin.  That is a separate, but related use case, to optional mempool 
fee calculations.  Why is it related?  Because the user may be accustomed to 
thinking in terms of Stable Coins, not mojos; and should the Stable Coin 
conversion calculation be manipulated by a duster, this could potentially cause 
large accidental fees/"donations" through the user interface.  Even if Chia Inc 
clamps the maximum fee in the GUI to prevent this, eventually there will be 
widely-used 3rd-party GUIs, so again this problem resurfaces.

I see Chia Inc has partnered with Stably and Dexie to do XCH/USDS Transactions, 
so perhaps there is a future data-feed.  I have zero inside information on Chia 
Inc's future plans; only what I see on Github and Chia.net.  
[https://dexie.space/get-usds](url)

Clean data = Happy users.

☮️

Edit: Word-Wrapped Paragraphs (*I don't see that feature Github*)

@danieljperry
Copy link
Contributor Author

Given that we now have both a dust filter and a working fee estimator (as of 1.7), and given that this proposal did not achieve consensus from the community, I am going to withdraw it from consideration.

CHIPs Backlog automation moved this from Draft to Withdrawn Feb 17, 2023
danieljperry added a commit that referenced this pull request Feb 21, 2023
@danieljperry danieljperry deleted the chip-0003 branch March 8, 2023 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
CHIPs Backlog
Withdrawn
Status: Draft
Development

Successfully merging this pull request may close these issues.

None yet

6 participants