Borrowing from Compound
In the first part of the "DeFi Protocol User Accounting" series we will cover #Compound protocol
What is Compound?
Compound allows users to deposit liquid assets in order to earn interest and protocol rewards. Once these assets are deposited, users receive cTokens, which represent each user’s claim on their share of all collateralized assets in the protocol. Users can also borrow liquid assets using cTokens as collateral. If, at any point, the collateral value becomes insufficient, a portion of the user’s collateral is sold (liquidated), and the proceeds from the sale are used to reduce or fully settle the outstanding debt.
How to Account for Compound?
Below we list typical transactions1 of users in Compound protocol and suggest accounting journal entries associated with such transactions.
1 Deposit collateral
a) User deposits collateral to a protocol-managed vault
DEBIT Collaterized Digital Assets (% Bearing)
CREDIT Digital Assets
b) Gas fees incurred in connection with a transaction where the depositor does not borrow funds should be expensed:
DEBIT Gas fees
CREDIT Digital Assets
2 Borrow
a) Users borrow funds against collateral (in some protocols users may place an order using margin).
DEBIT Digital Assets
CREDIT Crypto Borrowings
b) Record gas fees capitalized as deferred borrowing costs:
DEBIT Deferred Costs of Crypto Borrowings
CREDIT Digital Assets
3 Record interest
a) Record interest expense accrued on crypto borrowings during the period:
DEBIT Other Expense - Token Interests
CREDIT Crypto Borrowings
b) Amortize the deferred crypto borrowing costs:
DEBIT Other Expense - Token Interests
CREDIT Deferred Costs of Crypto Borrowings
c) Record interest income accrued on the interest-bearing deposits of collateral:
DEBIT Collaterized Digital Assets (% Bearing) / Accrued Interest Receivable
CREDIT Other Income - Token Interest
4 Remeasure
a) Record embedded derivatives due to the subsequent decline in active market prices
DEBIT Embedded Derivative on Crypto Borrowings
CREDIT Unrealized Gain/Loss on Embedded Derivatives
5 Liquidate loan
User collateral gets liquidated (in an internal transaction) by a third-party liquidator who repays the debt in return).
a) First, we update the embedded derivative value based on the current price:
DEBIT Embedded Derivative on Crypto Borrowings
CREDIT Unrealized Gain/(Loss) on Embedded Derivatives
b) After this we record the transfer of our collateral assets to the liquidator. In this scenario, the liquidator is unlikely to meet the definition of a customer for a reporting entity. This means that upon exchange we recognize only the net gain/(loss) as Other Income/Expenses. However, the liquidator acts as the reporting entity agent who is assigned to dispose of collateral assets on behalf of the reporting entity and use proceeds to acquire the assets necessary to settle the debt. Because the reporting entity loses control of collateral assets, but the other party acts like an agent (who is not under the control of the reporting entity, however), we recognize the transfer of collateral as tokens receivable from the liquidator:
DEBIT Due from liquidator
CREDIT Collaterized Digital Assets (% Bearing)
c) Next, we record the amount of settled debt against the balance of tokens receivable and simultaneously derecognize the portion of embedded derivative on crypto borrowings that was settled:
DEBIT Crypto Borrowings
CREDIT Embedded Derivative on Crypto Borrowings
CREDIT Due from liquidator
d) The liquidator is eligible for a fee to be taken out of the proceeds from the sale of collateral, so the portion of proceeds related to liquidator fees should be charged to expense accounts with the respective nature:
DEBIT Liquidation Fees
CREDIT Due from liquidator
e) Now the reporting entity may also receive the excess of proceeds over the settled amount of debt, liquidator fees, and other payments (if any):
DEBIT Digital Assets
CREDIT Due from liquidator
f) The remaining balance due from the liquidator represents the gain/(loss) on the disposal of collateral along with the settlement gain/(loss) on crypto borrowings. Both amounts are presented as other expenses/(income) as long as the transfer was to a liquidator who is a party other than the customer:
DEBIT Other Expenses
CREDIT Due from liquidator
g) Finally, we should reclassify the unrealized gain/loss from embedded derivatives to realized gain/loss:
DEBIT Unrealized Gain/Loss on Embedded Derivatives
CREDIT Unrealized Gain/Loss on Embedded Derivatives
6 Repay the loan
a) Derecognize embedded derivatives related to the debt being repaid
DEBIT Embedded Derivative on Crypto Borrowings
CREDIT Unrealized Gain/Loss on Embedded Derivatives
b) Settle the debt
DEBIT Crypto Borrowings
CREDIT Collaterized Digital Assets (% Bearing)
c) Gas gees
DEBIT Other expenses
CREDIT Digital Assets
d) Related unrealized gain/loss should now be reclassified to a realized gain/loss
DEBIT Unrealized Gain/Loss on Embedded Derivatives
CREDIT Unrealized Gain/Loss on Embedded Derivatives
7 Withdraw / Redeem Unliquidated Collateral:
a) We record the swap between collateral tokens and digital assets at cost:
DEBIT Digital Assets
CREDIT Collaterized Digital Assets (% Bearing)
b) We recognize the interest income earned on collateral (should be recognized each period from the date of collateral transfer to the date of return):
DEBIT Digital Assets
CREDIT Other Income / Accrued Interest Receivable
c) We also record the related gas fees as an expense because this fee is not incurred as part of the original acquisition of tokens:
DEBIT Other expenses
CREDIT Digital Assets
Journal entry postings here consist of two types of entries that are intended to account for two different financial effects of each DeFi transaction:
a) the underlying cryptocurrency-denominated activity that should be classified based on the nature of activities
b) the functional currency measurements of the underlying activities which are often further disaggregated by the classes of transaction based on the measurement features (for example, token receivable transactions are measured at the original acquisition date pricing of tokens, while the subsequent price fluctuations of token receivable balance accounted for as embedded derivatives.
Due to the complexity, we only show the first group of entries.