agentleFS
SperaxSperax/sperax-skills/skills/crypto-tax-basics/SKILL.md

crypto-tax-basics

Skill8 starsChanged 9 months agoMITView on GitHub

Guide to cryptocurrency taxation — taxable events, cost basis methods, DeFi tax implications, record keeping, and tax-loss harvesting. Use when helping users understand crypto tax obligations, track transactions for tax reporting, or plan tax-efficient strategies.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When you eventually sell, capital gains are calculated from that basis

    line 59

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Crypto Tax Basics Guide

A practical overview of cryptocurrency taxation for AI agents. Note: Tax laws vary by jurisdiction. Always recommend consulting a tax professional for specific advice.

Taxable Events in Crypto

Generally Taxable

EventTax TypeNotes
Selling crypto for fiatCapital gainsGain/loss = Sale price - Cost basis
Swapping token A for token BCapital gainsTreated as sell A + buy B
Using crypto to buy goods/servicesCapital gainsTreated as selling the crypto
Earning crypto (mining, staking rewards)IncomeTaxed as income at receipt
Receiving airdrop tokensIncomeTaxed at fair market value when received
DeFi interest/yieldIncomeTaxed as income when received

Generally NOT Taxable

EventNotes
Buying crypto with fiatNot taxable until you sell
Transferring between your own walletsNo gain/loss
Gifting (below thresholds)Gift tax may apply above limits
HoldingNo tax until you dispose

DeFi-Specific Tax Considerations

Lending & Borrowing

ActionTax Treatment
Supplying tokens to lendingGenerally not taxable (you retain ownership)
Receiving interestIncome at receipt
BorrowingNot taxable (it's a loan)
LiquidationCapital gains event on collateral

Liquidity Provision

ActionTax Treatment
Adding liquidityMay be taxable swap (depends on jurisdiction)
Receiving LP tokensRepresents your pool share
Earning trading feesIncome or capital gains (varies)
Removing liquidityMay trigger capital gains
Impermanent lossComplex — may not be deductible until realized

Rebasing Tokens (USDs, stETH)

For auto-yield tokens like USDs by Sperax:

  • Each rebase that increases your balance is potentially taxable income
  • The new tokens have a cost basis equal to their value at receipt
  • When you eventually sell, capital gains are calculated from that basis

Practical tip: Track rebase events if your jurisdiction treats them as income.

Staking Rewards

ScenarioTreatment
Receiving SPA staking rewards (xSPA)Income at fair market value when received
Staking xSPA → veSPAMay be a taxable event (exchange of one token for another)
Redeeming xSPA → SPAMay be a taxable event depending on jurisdiction

Cost Basis Methods

MethodHow It WorksBest For
FIFO (First In, First Out)Sell oldest tokens firstDefault in most jurisdictions
LIFO (Last In, First Out)Sell newest tokens firstMay reduce gains in rising markets
HIFO (Highest In, First Out)Sell highest-cost tokens firstMinimizes capital gains
Specific IdentificationChoose which lot to sellMaximum flexibility

Check your jurisdiction — not all methods are available everywhere.

Example (FIFO)

DateActionAmountPriceCost Basis
Jan 1Buy1 ETH$2,000$2,000
Mar 1Buy1 ETH$3,000$3,000
Jun 1Sell1 ETH$3,500-

FIFO: Sell the Jan ETH (cost $2,000) → Gain = $1,500 LIFO: Sell the Mar ETH (cost $3,000) → Gain = $500

Tax-Loss Harvesting

Strategy

Sell losing positions to realize capital losses, which offset capital gains:

Capital gains from profitable trades: +$10,000
Capital losses from tax-loss sales:   -$4,000
Net taxable gains:                     $6,000

Crypto Advantage

In many jurisdictions, crypto is NOT subject to wash-sale rules (unlike stocks):

  • Sell at a loss
  • Immediately buy back
  • Claim the loss

⚠️ This is changing in some jurisdictions. Check current rules.

At Year-End

  1. Review all positions with unrealized losses
  2. Sell positions where harvesting makes sense
  3. Optionally re-enter the position
  4. Document all transactions

Record Keeping

What to Track

For every transaction:

  • Date and time
  • Amount of crypto
  • Fair market value at time of transaction
  • Cost basis
  • Transaction fees (gas costs)
  • Purpose (trade, income, transfer)

Gas Fees

Gas fees are typically part of your cost basis:

  • Buying: Gas adds to cost basis
  • Selling: Gas reduces proceeds
  • DeFi interactions: Gas may be deductible as an expense

Tools

ToolFeatures
KoinlyMulti-chain, DeFi support, tax reports
CoinTrackerExchange + wallet tracking
TokenTaxDeFi-focused, professional support
AccointingEU-friendly, multi-country

Agent Tips

  1. Always add the disclaimer — you're not a tax advisor, recommend consulting a professional
  2. Every swap is taxable — users often don't realize swapping tokens triggers capital gains
  3. DeFi is complex — LP provision, rebasing, and staking all have tax implications
  4. Keep records — recommend tax tracking software from day one
  5. Gas is deductible — remind users to track gas costs
  6. Year-end planning — suggest reviewing positions for tax-loss harvesting opportunities
  7. Rebasing tokens (like USDs) — flag that each rebase may be a taxable event

Links

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.