Auric

Auric ERC-20

src/Auric.sol — extends OpenZeppelin ERC20 + Ownable.

Constructor

constructor(address initialOwner, address _treasury)
ParameterDescription
initialOwnerReceives ownership and the initial 1,000,000 AUR mint
_treasuryImmutable address that collects transfer tax

Token Parameters

PropertyValue
NameAuric
SymbolAUR
Decimals18
Initial Supply1,000,000 AUR minted to initialOwner

Mint

function mint(address to, uint256 amount) external onlyOwner

Owner-only. Calls _mint directly, bypassing the tax hook (mint is tax-exempt).

Burn

function burn(uint256 amount) external

Permissionless. Any holder can burn their own tokens. Calls _burn directly — burn is tax-exempt.

Transfer Tax

Non-exempt transfers are subject to a configurable tax routed to the treasury. Mint and burn operations are never taxed.

Constant / StateValueDescription
MAX_TAX_BPS1_000 (10%)Hard cap enforced in setTaxBps
taxBps0 defaultCurrent tax rate in basis points
treasuryimmutableRecipient of collected tax
taxExempt[account]mappingWhether transfers to or from an account bypass tax

Setting the tax

function setTaxBps(uint16 newBps) external onlyOwner

Reverts with TaxTooHigh() if newBps > MAX_TAX_BPS. Emits TaxUpdated(oldBps, newBps).

Tax calculation

Implemented in _update, which overrides the OZ ERC-20 internal hook:

tax = value * taxBps / 10_000
net transfer = value - tax

Two _update calls are made: one to send tax to treasury, one to send value - tax to the intended recipient.

Tax exemptions

  1. from == address(0) → mint (skipped)
  2. to == address(0) → burn (skipped)
  3. taxBps == 0 → no tax computed taxExempt[from] || taxExempt[to] → protocol transfer (skipped)

The owner manages exemptions with setTaxExempt(account, isExempt). The v2 deployment script exempts the vesting and AMM contracts so their exact-balance accounting remains valid even when transfer tax is enabled.

Events

EventEmitted by
TaxUpdated(uint16 oldBps, uint16 newBps)setTaxBps
TaxExemptionUpdated(address account, bool isExempt)setTaxExempt
Standard ERC-20 Transfer / Approvalinherited

Custom Errors

ErrorCondition
TaxTooHigh()newBps > MAX_TAX_BPS in setTaxBps
ZeroAddress()Zero treasury or exemption account