TaxCalculator
Contracts/src/contracts/TaxCalculator.sol
Interface: Contracts/src/interfaces/ITaxCalculator.sol
Pure tax-curve resolver consumed by Listings to size up-front Harberger
tax for liquid + dutch listings. The default calculator is shared across
all collections; per-collection overrides can be installed via
Listings.setCollectionTaxCalculator(_collection, _taxCalculator) for
collections that need a different curve.
Public surface
interface ITaxCalculator {
function calculateTax(
address _collection,
uint _floorMultiple,
uint _duration
) external view returns (uint);
}| Param | Meaning |
|---|---|
_collection | ERC-721 contract — included so the calculator can branch per-collection if it wants to |
_floorMultiple | 2dp price (100 = 1.00x) |
_duration | Listing duration in seconds |
Returns the tax in nativeToken units required to register the listing.
Implementation notes
- The default calculator is parameter-light (
floorMultiple ^ k * duration-style) and doesn’t read storage. Overrides are free to be heavier — gas cost surfaces directly inListings.createListings/modifyListingsreceipts. - Listings always queries via
Listings.taxCalculator(_collection)rather than calling the calculator directly; that read applies the override-or-default fallback.
Inherited surface
None — TaxCalculator is a stateless view-only contract.