Skip to content
← All projects

Fintech web app

Cryptoskatt

Cryptoskatt turns a Swedish crypto trader's transaction history into the numbers for the K4 tax form. Without a tool, that means a spreadsheet and a long evening with Skatteverket's rules.

Cryptoskatt project screenshot

The problem

Sweden taxes each crypto disposal as a capital gain, calculated with the average cost basis (genomsnittsmetoden). Anyone who has traded on more than one exchange soon has hundreds of transactions to reconcile by hand. The existing tools are mostly international, priced in dollars and not built around the Swedish declaration.

What I built

A Next.js app in TypeScript. Traders import transactions as CSV files from Binance, Coinbase or Kraken, or straight from a Bitcoin, Ethereum, Solana or EVM wallet address. The app calculates the cost basis with the average-cost method, including crypto-to-crypto trades, and converts each transaction to SEK with Riksbanken's exchange rate for that day. The result is a finished K4 form (SKV 2104) ready to upload to Skatteverket, with the 30% tax on gains and the 70% rule for deducting losses already applied. Supabase handles accounts and data storage, and Stripe handles payment.

Why it's built this way

The Swedish rules are the product, so the app is in Swedish and follows the K4 flow. Supabase keeps the backend small enough for one developer to run safely, and row-level security in the database protects what is sensitive financial data. Stripe handles payment the way Swedish users are used to.

Highlights

  • Average-cost method per Skatteverket's rules, including crypto-to-crypto trades
  • Imports from exchange CSVs and directly from wallet addresses across seven chains
  • Exports a finished K4 form (SKV 2104) ready for Skatteverket
  • Next.js and TypeScript, Supabase for auth and data, Stripe for payments
  • Built for Sweden: Swedish language, Swedish tax rules, the K4 flow

Got a project in mind?

Tell me what you're building and I'll get back to you within a day. You can also email me at adampeleback@gmail.com.

Send a message