diff --git a/docs/input_files.md b/docs/input_files.md index 55bb309..29c29f8 100644 --- a/docs/input_files.md +++ b/docs/input_files.md @@ -38,7 +38,7 @@ The input spreadsheet is in .ods format and contains one or more sheets. Each sh * the second row is the table header: the meaning of each header cell is defined in the **in_header** section of the config file * the following rows describe one **IN**-transaction each * the last row contains the **TABLE END** keyword in column A -* The **OUT**-table (optional) contains transactions describing crypto flowing out (e.g. donate, fee, gift, sell, staking): +* The **OUT**-table (optional) contains transactions describing crypto flowing out (e.g. donate, fee, gift, lost, sell, staking): * the first row contains the **OUT** keyword in column A * the second row is the table header: the meaning of each header cell is defined in the **out_header** section of the config file * the following rows describe one **OUT**-transaction each @@ -74,7 +74,7 @@ Here follows an example of an input spreadsheet with 2 sheets (one for BTC and o * **asset**: which cryptocurrency was transacted (e.g. BTC, ETH, etc.). It must match the name of the spreadsheet and one of the values in the **assets** section of the config file. * **exchange**: exchange or wallet on which the transaction occurred (e.g. Coinbase, Coinbase Pro, BlockFi, etc.). It must match one of the values in the **exchanges** section of the config file. * **holder**: exchange account or wallet owner. It must match one of the values in the **holders** section of the config file. - * **transaction_type**: DONATE, FEE, GIFT, SELL or STAKING (this is useful to represent staking losses, due to node being offline, etc.). + * **transaction_type**: DONATE, FEE, GIFT, LOST (useful to represent lost coins, due to exchange bankruptcy, theft, etc.), SELL or STAKING (useful to represent staking losses, due to node being offline, etc.). * **spot_price**: value of 1 unit of the given cryptocurrency at the time the transaction occurred. * **crypto_out_no_fee**: how much of the given cryptocurrency was sold or sent with the transaction (excluding fees). * **crypto_fee**: crypto value of the transaction fees. diff --git a/docs/user_faq.md b/docs/user_faq.md index caf435f..c01ddda 100644 --- a/docs/user_faq.md +++ b/docs/user_faq.md @@ -90,7 +90,7 @@ The user adds the tokens to the `assets` field of the [config file](input_files. Accounting methods vary country by country, as described in the [supported countries](supported_countries.md) document. ### Do Accounting Methods Use Universal or Per-Wallet Application? -RP2 engine uses [universal application](https://www.forbes.com/sites/shehanchandrasekera/2020/09/17/what-crypto-taxpayers-need-to-know-about-fifo-lifo-hifo-specific-id/), not per-wallet application: this means there is one queue for each coin across every wallet and exchange and the accounting method is applied to each such queue. +RP2 engine currently supports [universal application](https://www.forbes.com/sites/shehanchandrasekera/2020/09/17/what-crypto-taxpayers-need-to-know-about-fifo-lifo-hifo-specific-id/) application, however per-wallet support is [being worked on](https://github.com/eprbell/rp2/issues/135). ### Can I Change Accounting Method? Yes, for countries that support more than one accounting method, you can select which one to use via the `-m` command line option, or you can use the `accounting_methods` section of the [config file](https://github.com/eprbell/rp2/blob/main/docs/input_files.md#the-config-file). diff --git a/src/rp2/entry_types.py b/src/rp2/entry_types.py index fb3f704..4103b52 100644 --- a/src/rp2/entry_types.py +++ b/src/rp2/entry_types.py @@ -29,6 +29,7 @@ class TransactionType(Enum): HARDFORK = "hardfork" INCOME = "income" INTEREST = "interest" + LOST = "lost" MINING = "mining" MOVE = "move" SELL = "sell" @@ -79,6 +80,7 @@ def get_translation(self) -> str: TransactionType.HARDFORK: _("hardfork"), TransactionType.INCOME: _("income"), TransactionType.INTEREST: _("interest"), + TransactionType.LOST: _("lost"), TransactionType.MINING: _("mining"), TransactionType.MOVE: _("move"), TransactionType.SELL: _("sell"), diff --git a/src/rp2/out_transaction.py b/src/rp2/out_transaction.py index 3f2f59c..4e57e12 100644 --- a/src/rp2/out_transaction.py +++ b/src/rp2/out_transaction.py @@ -83,7 +83,14 @@ def __init__( self.__fiat_fee = configuration.type_check_positive_decimal("fiat_fee", fiat_fee) self.__fiat_out_with_fee = self.__fiat_out_no_fee + self.__fiat_fee - if self.transaction_type not in (TransactionType.DONATE, TransactionType.FEE, TransactionType.GIFT, TransactionType.SELL, TransactionType.STAKING): + if self.transaction_type not in ( + TransactionType.DONATE, + TransactionType.FEE, + TransactionType.GIFT, + TransactionType.LOST, + TransactionType.SELL, + TransactionType.STAKING, + ): raise RP2ValueError( f"{self.asset} {type(self).__name__} ({self.timestamp}, id {self.internal_id}): invalid transaction type {self.transaction_type}" ) diff --git a/src/rp2/plugin/report/us/tax_report_us.py b/src/rp2/plugin/report/us/tax_report_us.py index aac3fd2..33deb11 100644 --- a/src/rp2/plugin/report/us/tax_report_us.py +++ b/src/rp2/plugin/report/us/tax_report_us.py @@ -39,6 +39,7 @@ class SheetNames(Enum): INCOME = "Income" INTEREST = "Interest" INVESTMENT_EXPENSES = "Investment Expenses" + LOST = "Lost" MINING = "Mining" STAKING = "Staking" WAGES = "Wages" @@ -56,6 +57,7 @@ class SheetNames(Enum): SheetNames.INTEREST.value: (TransactionType.INTEREST,), SheetNames.INVESTMENT_EXPENSES.value: ( TransactionType.FEE, + TransactionType.LOST, TransactionType.MOVE, ), SheetNames.MINING.value: (TransactionType.MINING,),