def event_settings( self, pot: 'AccountingPot' ) -> Dict[str, TxEventSettings]: # pylint: disable=unused-argument # noqa: E501 """Being defined at function call time is fine since this function is called only once""" return { get_tx_event_type_identifier(HistoryEventType.SPEND, HistoryEventSubType.DONATE, CPT_GITCOIN): TxEventSettings( # noqa: E501 taxable=True, # Do not count donation as expense count_entire_amount_spend=False, count_cost_basis_pnl=True, method='spend', take=1, multitake_treatment=None, ), get_tx_event_type_identifier(HistoryEventType.RECEIVE, HistoryEventSubType.DONATE, CPT_GITCOIN): TxEventSettings( # noqa: E501 taxable=True, # Do not count donation as expense count_entire_amount_spend=False, count_cost_basis_pnl=True, method='acquisition', take=1, multitake_treatment=None, ), }
def event_settings(self, pot: 'AccountingPot') -> Dict[str, TxEventSettings]: # pylint: disable=unused-argument # noqa: E501 """Being defined at function call time is fine since this function is called only once""" return { get_tx_event_type_identifier(HistoryEventType.DEPOSIT, HistoryEventSubType.DEPOSIT_ASSET, CPT_AAVE_V1): TxEventSettings( # noqa: E501 taxable=False, count_entire_amount_spend=False, count_cost_basis_pnl=False, method='spend', take=2, multitake_treatment=TxMultitakeTreatment.SWAP, ), get_tx_event_type_identifier(HistoryEventType.SPEND, HistoryEventSubType.RETURN_WRAPPED, CPT_AAVE_V1): TxEventSettings( # noqa: E501 taxable=False, count_entire_amount_spend=False, count_cost_basis_pnl=False, method='spend', take=2, multitake_treatment=TxMultitakeTreatment.SWAP, ), get_tx_event_type_identifier(HistoryEventType.RECEIVE, HistoryEventSubType.REWARD, CPT_AAVE_V1): TxEventSettings( # noqa: E501 taxable=True, count_entire_amount_spend=False, count_cost_basis_pnl=True, method='acquisition', take=1, ), }
def event_settings( self, pot: 'AccountingPot' ) -> Dict[str, TxEventSettings]: # pylint: disable=unused-argument # noqa: E501 """Being defined at function call time is fine since this function is called only once""" return { get_tx_event_type_identifier(HistoryEventType.DEPOSIT, HistoryEventSubType.DEPOSIT_ASSET, CPT_LIQUITY): TxEventSettings( # noqa: E501 taxable=False, count_entire_amount_spend=False, count_cost_basis_pnl=False, method='spend', take=1, multitake_treatment=None, ), get_tx_event_type_identifier(HistoryEventType.SPEND, HistoryEventSubType.PAYBACK_DEBT, CPT_LIQUITY): TxEventSettings( # noqa: E501 taxable=False, count_entire_amount_spend=False, count_cost_basis_pnl=False, method='spend', take=1, multitake_treatment=None, ), get_tx_event_type_identifier(HistoryEventType.WITHDRAWAL, HistoryEventSubType.GENERATE_DEBT, CPT_LIQUITY): TxEventSettings( # noqa: E501 taxable=False, count_entire_amount_spend=False, count_cost_basis_pnl=False, method='acquisition', take=1, multitake_treatment=None, ), get_tx_event_type_identifier(HistoryEventType.WITHDRAWAL, HistoryEventSubType.REMOVE_ASSET, CPT_LIQUITY): TxEventSettings( # noqa: E501 taxable=False, count_entire_amount_spend=False, count_cost_basis_pnl=False, method='acquisition', take=1, multitake_treatment=None, ), }
def event_settings(self, pot: 'AccountingPot') -> Dict[str, 'TxEventSettings']: """Being defined at function call time is fine since this function is called only once""" return { get_tx_event_type_identifier(HistoryEventType.TRADE, HistoryEventSubType.SPEND, CPT_ONEINCH_V1): TxEventSettings( # noqa: E501 taxable=True, count_entire_amount_spend=False, count_cost_basis_pnl=True, method='spend', take=2, multitake_treatment=TxMultitakeTreatment.SWAP, ), get_tx_event_type_identifier(HistoryEventType.SPEND, HistoryEventSubType.FEE, CPT_ONEINCH_V1): TxEventSettings( # noqa: E501 taxable=True, count_entire_amount_spend=False, count_cost_basis_pnl=True, method='spend', take=1, multitake_treatment=None, ), }
def event_settings(self, pot: 'AccountingPot') -> Dict[str, 'TxEventSettings']: """Being defined at function call time is fine since this function is called only once""" return { get_tx_event_type_identifier(HistoryEventType.DEPOSIT, HistoryEventSubType.DEPOSIT_ASSET, CPT_PICKLE): TxEventSettings( # noqa: E501 taxable=False, count_entire_amount_spend=False, count_cost_basis_pnl=False, method='spend', take=2, multitake_treatment=TxMultitakeTreatment.SWAP, ), get_tx_event_type_identifier(HistoryEventType.SPEND, HistoryEventSubType.RETURN_WRAPPED, CPT_PICKLE): TxEventSettings( # noqa: E501 taxable=False, count_entire_amount_spend=False, count_cost_basis_pnl=False, method='spend', take=2, multitake_treatment=TxMultitakeTreatment.SWAP, ), }
def event_settings( self, pot: 'AccountingPot' ) -> Dict[str, TxEventSettings]: # pylint: disable=unused-argument # noqa: E501 """Being defined at function call time is fine since this function is called only once""" return { get_tx_event_type_identifier(HistoryEventType.TRADE, HistoryEventSubType.SPEND, CPT_KYBER): TxEventSettings( # noqa: E501 taxable=True, count_entire_amount_spend=False, count_cost_basis_pnl=True, method='spend', take=2, multitake_treatment=TxMultitakeTreatment.SWAP, ), }
def event_settings( self, pot: 'AccountingPot' ) -> Dict[str, TxEventSettings]: # pylint: disable=unused-argument # noqa: E501 """Being defined at function call time is fine since this function is called only once""" return { get_tx_event_type_identifier(HistoryEventType.DEPOSIT, HistoryEventSubType.BRIDGE, CPT_ZKSYNC): TxEventSettings( # noqa: E501 taxable=False, count_entire_amount_spend=False, count_cost_basis_pnl=False, method='spend', take=1, multitake_treatment=None, ), }
def event_settings(self, pot: 'AccountingPot') -> Dict[str, 'TxEventSettings']: """Being defined at function call time is fine since this function is called only once""" airdrops_taxable = LedgerActionType.AIRDROP in pot.settings.taxable_ledger_actions return { get_tx_event_type_identifier(HistoryEventType.RECEIVE, HistoryEventSubType.AIRDROP, counterparty): TxEventSettings( # noqa: E501 taxable=airdrops_taxable, count_entire_amount_spend=False, count_cost_basis_pnl=False, method='acquisition', take=1, multitake_treatment=None, ) for counterparty in AIRDROPS_LIST }
def event_settings( self, pot: 'AccountingPot' ) -> Dict[str, TxEventSettings]: # pylint: disable=unused-argument # noqa: E501 """Being defined at function call time is fine since this function is called only once""" # TODO: How can we count here loss from debt and gain from DSR? We need to keep state return { # vault collateral deposit get_tx_event_type_identifier(HistoryEventType.DEPOSIT, HistoryEventSubType.DEPOSIT_ASSET, CPT_VAULT): TxEventSettings( # noqa: E501 taxable=False, count_entire_amount_spend=False, count_cost_basis_pnl=False, method='spend', take=1, ), # vault collateral withdraw get_tx_event_type_identifier(HistoryEventType.WITHDRAWAL, HistoryEventSubType.REMOVE_ASSET, CPT_VAULT): TxEventSettings( # noqa: E501 taxable=False, count_entire_amount_spend=False, count_cost_basis_pnl=False, method='acquisition', take=1, ), # payback DAI to vault get_tx_event_type_identifier(HistoryEventType.SPEND, HistoryEventSubType.PAYBACK_DEBT, CPT_VAULT): TxEventSettings( # noqa: E501 taxable=False, count_entire_amount_spend=False, count_cost_basis_pnl=False, method='spend', take=1, accountant_cb=self._process_vault_dai_payback, ), # generate DAI from vault get_tx_event_type_identifier(HistoryEventType.WITHDRAWAL, HistoryEventSubType.GENERATE_DEBT, CPT_VAULT): TxEventSettings( # noqa: E501 taxable=False, count_entire_amount_spend=False, count_cost_basis_pnl=False, method='acquisition', take=1, accountant_cb=self._process_vault_dai_generation, ), # Deposit DAI in the DSR get_tx_event_type_identifier(HistoryEventType.DEPOSIT, HistoryEventSubType.DEPOSIT_ASSET, CPT_DSR): TxEventSettings( # noqa: E501 taxable=False, count_entire_amount_spend=False, count_cost_basis_pnl=False, method='spend', take=1, accountant_cb=self._process_dsr_deposit, ), # Withdraw DAI from the DSR get_tx_event_type_identifier(HistoryEventType.WITHDRAWAL, HistoryEventSubType.REMOVE_ASSET, CPT_DSR): TxEventSettings( # noqa: E501 taxable=False, count_entire_amount_spend=False, count_cost_basis_pnl=False, method='acquisition', take=1, accountant_cb=self._process_dsr_withdraw, ), # Migrate SAI to DAI get_tx_event_type_identifier(HistoryEventType.MIGRATE, HistoryEventSubType.SPEND, CPT_MIGRATION): TxEventSettings( # noqa: E501 taxable=False, count_entire_amount_spend=False, count_cost_basis_pnl=False, method='spend', take=2, multitake_treatment=TxMultitakeTreatment.SWAP, ), }