Topic: Support CryptoCurrency as a Asset/Currency Account

One aspect of my business is to perform cryptocurrency mining (Proof Of Work) generating income as an asset.

How could we manage this type of ledger?

Generally Crypto is considered an Asset and POW coins more so since they can not be minted (created) out of thin air.

My first thought is they are very much like an Inventory Item (Physical Asset) that has an account (GL?) tracking the realized value.

For example if I earn 20 coins while the value (price) is $0.50 the value/income if $10.00
If I sell 5 coins at $1.50 that would obviously be an additional $5 of income and I think typically the income would be calculated on the oldest unsold coins, First In, First Out

So at this point we have $15 of income and a current asset value of (20-5)*1.50 = $22.50 with Unrealized gains of $15.00

Are my thoughts on this reasonably accurate?

I think these point are common to all localities, but the calculation of Long/Short Term Gains would be left to tax calculations

I am not looking to pay someone to do this, but could use some help.

I do not believe such a fundamental feature qualifies as an add-on that is sold.

So I am asking for anyone who has the skills to do it contribute their time which is the whole point of open source.

Supporting Crypto will help keep FA relevant and I do not think these changes will be overly dramatic to implement.

Anyone interested in working with me?
--
Tom

PS
I have been using FA for over 15 years and have submitted every modification I needed for my shop as either a patch or extension.

For example:
Bank Fees on customer payments
osCommerce customer/order import extension

I am currently working on a WooCommerce order import extension which I will make freely available in the core FA repo

My son and I are also deploying FA as a turnkey application on Flux Web services (runonflux.io) which is a distributed compute network on a blockchain

Re: Support CryptoCurrency as a Asset/Currency Account

It dawned upon me that what I referred to as "current asset value" was actually Cost Basis.
I also think that both the Cost Basis, Unrealized Gains and Profit are all Tax/Reporting issues.

So I think I need to better understand how item cost is calculated and used in inventory.

More later
Tom

Re: Support CryptoCurrency as a Asset/Currency Account

Hey Tom, I think your approach is solid. Treating mined crypto like inventory and using FIFO for gains makes sense. Keeping a GL for each transaction should help with tracking. Adding crypto support to FA is a great idea. Good luck with it!

Re: Support CryptoCurrency as a Asset/Currency Account

I would be more than willing to help out on this. Most of these things already exist it is a question of FA integration. as a miner your issue is triggering the payout from pool or subsidy if solo miner (unlikely lol) to monitor wallets without a payment platform you could use electrum to monitor wallets on blockchain (I have not done this before everything I have done is payment integrations).

for a woo payment integration use
btcpayserver supports woo already
https://docs.btcpayserver.org/WooCommerce/

Note: I will only work on projects that are related to Bitcoin not "crypto". If it works on bitcoin as well, that is ok. Certain stable coins (fiat security tokens) as well.

Re: Support CryptoCurrency as a Asset/Currency Account

I am not overly concerned with live import, I was considering monthly import maybe via CSV profit/loss and tax reporting

I saw your other post, not sure which thread is most appropriate...

Re: Support CryptoCurrency as a Asset/Currency Account

Sure, you can handle this by importing a CSV file. I would think the CSV import transactions module should be able to do this with little or no changes.

The main challenge is tracking the transactions. When using Bitcoin as a payment method with services like LNbits or BTCPayServer, they can send a webhook to your server with the fiat value and the number of inventory units you received. This makes it easy to track the cost basis. It sits in your books as the value you received it for, and then when you sell, you capture the gain or loss.

A typical method is FIFO (First In, First Out), where the gain is applied to the oldest inventory first. You would need to manually enter the sale transaction, and the system (FA, for example) should calculate the gain for you. I know it does this when Bitcoin is treated as a foreign currency.

If you're just monitoring a wallet address, you need something like Electrum Server. For example, I have one set up on a small home server running Debian with Umbrel (Umbrel). You can configure it to monitor wallet(s), record transactions in and out, and calculate gains or losses based on the spot price at the time of the transaction.

There are also many online tax tools for crypto that allow you to import CSV files, and they will handle the calculations for you and prepare the necessary tax forms.

Re: Support CryptoCurrency as a Asset/Currency Account

If I use a CSV Import file for inventory adjustments and I have the correct price for each record then WILL FA compute the correct gain or loss?
Or maybe the question is are there some other matching transactions I need to generate and import as well?

The FIFO aspect is one I am not sure FA handles properly, I want to get this right now so I don't discover an issue 5 years from now and have to clean up a big mess...