---
# System prepended metadata

title: Transaction Fee Mechanisms

---

# Transaction Fee Mechanisms

## Auctions in DLTs

### First-price auctions (FPAs)

* Bitcoin

Drawbacks:
* Fee instability
* Extremely inefficient *for the user, who tends to underpay or overpay* (difficult to choose the right fee)
* Big UX barrier


### Ethereum EIP-1559

EIP-1559: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md

Variation of EIP-1559 in Filecoin: https://filfox.info/en/stats/gas

Variation of EIP-1559 in NEAR:
* https://near.org/papers/the-official-near-white-paper/
* https://docs.near.org/concepts/basics/transactions/gas

Ideas behind EIP-1559
* *Variable, objectively calculated*, history-dependent Base fee *which is burned*
* Tips *(which are paid to the block producer)* are bids in FPA (sort of emergency mechanism in case of congestion)
* Variable-sized blocks *with a target and a maximum size*

EIP-1559
* satisfies MMIC and OCA-proofness conditions
* is DSIC (except when there is a sudden demand spike)


Truthful bidding is usually optimal (https://dl.acm.org/doi/pdf/10.1145/3485447.3512051)

### Polkadot Transaction Fees

https://wiki.polkadot.network/docs/learn-transaction-fees

Weight-based model: once the fee is paid, nodes will execute the transaction

Fees are calculated based on:
* Weight fee
* Length fee
* Tip (optional)

### StableFees

S. Basu et al., "StableFees: A Predictable Fee Market for Cryptocurrencies" in Tokenomics 2019: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3318327

* Monopolistic approach (second price auction)
* Users are incentived to bid their true value
* Maximizes social welfare

**Algorithm**:
* Charge the minimum fee in the block
* The miner will be receiving the average of the large n blocks mined

**Drawback**: not OCA-proof


## Definitions

**DSIC: Dominant Strategy Incentive Compatibility**
Robustness to deviations from straightforward bidding by transaction creators.

**MMIC: Incentive Compatibility for Myopic Miners**
A transaction fee mechanism should be robust to deviations by profit-maximizing miners from the intended allocation rule and also the injection of fake transactions

**OCA-proof: Off-chain Agreement**
The mechanism should be robust to cartels of transaction creators and miners colluding off-chain; more precisely, no off-chain arrangement among members of such a cartel should be capable of Pareto improving over a canonical on-chain outcome.

Proof that no transaction fee mechanism is always DSIC, MMIC and OCA-proof: https://arxiv.org/abs/2111.03151

## Additional reading material

Y. Liu et al., "Empirical Analysis of EIP-1559: Transaction Fees, Waiting Times, and Consensus Security" in ACM SIGSAC 2022: https://arxiv.org/pdf/2201.05574.pdf (check references in it)

Z. Shi et al., "Integration of Blockchain and Auction Models: A Survey, Some Applications, and Challenges" in ArXiv: https://arxiv.org/abs/2110.12534

G. Yan et al., "Dynamic Game Model for Ranking Bitcoin Transactions Under GSP Mechanism" in IEEE Access: https://ieeexplore.ieee.org/document/9112199

Roughgarden T., "Transaction Fee Mechanism Design": https://arxiv.org/pdf/2106.01340.pdf

[Roughgarden speech at UZH](https://uzh.mediaspace.cast.switch.ch/channel/UZH%2BBlockchain%2BCenter%2B-%2BLecture%2BSeries/13110)

## Slides and Recording
- [Slides](https://docs.google.com/presentation/d/1RvlZPbepxJNxudZmHWUCF71KGAw-1Ins/edit?usp=share_link&ouid=115542597871066403253&rtpof=true&sd=true)
- [Recording](https://drive.google.com/file/d/1ixYFvhSaSXTXXK82G2vhyoOIJePMZFW-/view?usp=share_link)