Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 2.08 KB

kip-0002.md

File metadata and controls

63 lines (43 loc) · 2.08 KB
KIP Title Author Status Type Category Created
2
fungible-v1
Stuart Popejoy stuart@kadena.io
Final
Standard
Chainweb
2019-10-08

Abstract

Define and implement a Pact interface to provide a fungible coin or token standard, drawing inspiration from ERC-20 and related token standards.

Motivation

The outstanding motivation at time of writing is to ensure interoperability between the Kadena token, as implemented in the "coin contract", and tokens that will exist on the system.

Otherwise, ERC-20 and related standards have proved their worth many times over. However Pact has it's own way of doing things and fungible reflects that.

Rationale

Not including totalSupply

This can be specified in a separate interface, but for the coin contract, this is an expensive feature that is unnecessary for runtime operation, and is better handled by off-chain market data.

Decimal units

This fits with Pact's embrace of arbitrary-precision Decimal which is safe and expressive to use. However there is no practical limit on precision, so this is an important specification for a token, and indeed for the coin contract.

No metadata

Things like name, symbol and other asset metadata are not relevant here.

On-behalf-of not specified.

As noted above, managed capabilities allow for safe inter-contract transfer within a single transaction. This addresses one need of on-behalf-of in a single transaction.

The ability to lock up an amount for another party in a later transaction is not specified. This can be easily achieved by creating dedicated escrow accounts with multisig and/or a user guard if features like timeouts are desired.

Transfer restrictions not specified

Whitelisting/blacklisting and other security token standards are not specified.

Backwards Compatibility

N/A

Specification

See fungible-v1.pact

References