ds-token icon indicating copy to clipboard operation
ds-token copied to clipboard

Intentional use of accounting terms?

Open charles-cooper opened this issue 7 years ago • 2 comments

I'm wondering if the use of the words 'debit' and 'credit' in the definitions of 'mint' and 'burn' are intentionally used in the technical accounting sense of the term or not. The current wording implies that accounts are credit-normal (like a liability) and the total supply is debit-normal (like an asset). If that's the case, I think that that should be made explicit in the readme and the verbiage on https://github.com/dapphub/ds-token/blob/13e09345fb459103875a6266705a14ab6f72b6d3/README.md#L18-L24 should change to read more like

#### `mint`
increase (credit) tokens at an address whilst simultaneously increasing (debiting) `totalSupply`  
(requires auth) 

#### `burn` 
decrease (debit) tokens at an address whilst simultaneously decreasing (crediting) `totalSupply`  
(requires auth)

charles-cooper avatar Mar 07 '18 21:03 charles-cooper

No, this is not intentional and there is no relation to the technical terms. We should probably change the wording to avoid confusion.

Perhaps drop the terms entirely:

#### `mint`
increase the `totalSupply` by increasing the balance of a specific address
(requires auth) 

#### `burn` 
decrease the `totalSupply` by decreasing the balance of a specific address
(requires auth)

rainbreak avatar Mar 08 '18 07:03 rainbreak

Cool, thanks!

My own two cents is that using the double entry accounting terms can lend a lot of clarity since they have implications about money supply invariants - in this case totalSupply == sum(balances). The only question would be which accounts are debit/credit normal but I think making user balances credit normal would be most natural.

charles-cooper avatar Mar 09 '18 00:03 charles-cooper