transaction costs:

73 views
Skip to first unread message

david e

unread,
Apr 6, 2021, 3:16:08 PM4/6/21
to Beancount
I am wondering about how to book transaction costs correctly. as I am doing ethereum tx, I have to track cost basis of the fees. compared to paying fees to a broker, this is a bit more work.  

my entry would look like this: 

2018-01-01 * "Send 1.5 ETH & 0.05 ETH gas"
Assets:Crypto:ETH -1.55 ETH {}
Expenses:Crypto 100 USD
Expenses:Crypto:Fees 1 USD
Income:Crypto:PnL 

but in this case, the PnL is the total of both ETH entries (Assets and Fees). to have the entries separated, it could look like this, split into two entries:

2018-01-01 * "Send 1.5 ETH example"
Assets:Crypto:ETH -1.5 ETH {}
Expenses:Crypto 100 USD
Income:Crypto:PnL 

2018-01-01 * "Send 0.05 ETH for gas example"
Assets:Crypto:ETH -0.05 ETH {}
Expenses:Crypto:Fees 1 USD
Income:Crypto:PnL 

my question: is it possible to calculate / report the PnL of the fees separately even though I list it in one entry as shown above? or do I have to split it for correct calculation?

my assumption is that for tax reporting I have to be able to list PnL for each position and therefore it would be a problem to mix it with the fees. 

thanks

Martin Blais

unread,
Apr 6, 2021, 6:16:41 PM4/6/21
to Beancount
There's no facility to do this.
You can write a script to handle the separation by processing the stream of transactions yourself.


--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/929614fd-dbff-4a6f-a43e-07dfd3ab7879n%40googlegroups.com.

david e

unread,
Apr 10, 2021, 10:08:43 AM4/10/21
to Beancount
wouldn't it be correct to add the transaction costs in its own account into the transaction, and thereby beancount is able to list the fees separately?

compared to my example from above I would have to add one line:

2018-01-01 * "Send 1.5 ETH & 0.05 ETH gas"
Assets:Crypto:ETH     -1.5 ETH {}  ;; list the ETH amount without tx cost
Expenses:Crypto         100 USD    ;; matching the 1.5 eth
Assets:Crypto:ETH     -0.05 ETH {} ;; tx cost listed separately
Expenses:Crypto:Fees      1 USD    ;; cost matching the 0.05 eth
Income:Crypto:PnL

this way I would be able to query for all entries including fees and therefore this solution works instead of dividing the tx into two entries? 

Martin Blais

unread,
Apr 10, 2021, 10:13:47 AM4/10/21
to Beancount
Beancount won't be able to work out the booking automatically this way, too many unknown numbers to fill in.


david e

unread,
Apr 10, 2021, 10:19:44 AM4/10/21
to Beancount
but it doesn't return an error and compared to my manual calculation the amount for PnL seems correct.

I guess you mean beancount isn't able to divide the PnL for each accounts, only the sum to match the entries?

Martin Blais

unread,
Apr 10, 2021, 10:57:01 AM4/10/21
to Beancount
No I though the two separate {} could not be booked. I don't remember.
I don't remember what I did, look at file booking_full.py for details.



Reply all
Reply to author
Forward
0 new messages