Recently, the PlatON community initiated the
PIP-12 proposal to introduce PRC-12, a new standard for EVM-compatible fungible tokens (FT). This standard realizes the functions of delegated authorization and delegated transfer for token holders, simplifying the interaction process between users and smart contracts, reducing transaction costs, and enhancing token security and flexibility.
As an extension and optimization based on existing standards such as EIP-20, EIP-2612, and EIP-3009, PRC-12 mainly introduces the following functionalities:
- Delegated authorization (permit): Token holders can authorize third-party callers (application contracts) to invoke the approve function on their behalf by signing a message, thus eliminating the need to send a transaction to approve.
- Delegated transfer (transferWithAuthorization/receiveWithAuthorization): Token holders can authorize third-party callers (application contracts) to invoke the transfer function on their behalf by signing a message, thus eliminating the need to send a transaction to execute the transfer.
- Meta transaction (meta transaction): Token holders can authorize third-party callers to pay gas fees on their behalf by signing a message, so that they can perform any token operation without holding ETH to cover gas fees.
For existing PRC20 token contracts deployed on blockchain networks, a forwarder contract (“forwarder”) can be constructed to introduce support for PIP-12 and achieve backward compatibility.
The “delegated authorization” process is faced with several potential security risks. For example, signatures can be forged by delegates before the delegator initiates the delegation, which could jeopardize the delegator’s asset security; or in other cases, message signatures on different EVM-compatible blockchains could be abused, resulting in replay attacks on the delegator’s on-chain assets. In response, PIP-12 has provided countermeasures to secure on-chain assets.
The PRC-12 standard adds more possibilities to the use cases of FTs, including decentralized exchanges (DEX), lending platforms, and NFT marketplaces. User experience has been improved as the standard eliminates the need for pre-authorization, holding ETH, or waiting for confirmations. What’s more, new functionalities such as prevention of replay attacks, cancellation of operation, and validity setting make tokens more secure and flexible.
Furthermore, the PRC-12 standard can support various payment scenarios, such as stablecoin issuance, cross-chain transfers, and lightning networks. Through the PRC-12 standard interface, users can conveniently pay or receive various FTs based on the PlatON network or other EVM-compatible networks, with lower fees and faster speeds.
Currently, the PRC-12 standard is publicly available on GitHub [https://github.com/PlatONnetwork/PIPs/blob/master/PIPs/PIP-12.md] and has invited the community for review and feedback. This standard aims to become an open and general interface for FTs that is widely supported and adopted. Moreover, the source code of the PRC-12 standard will be made available for the community in the future, and developers or projects that are interested are welcome to deploy and utilize FT contracts based on the PRC-12 standard on the PlatON network or other EVM-compatible networks.
This article is reproduced from https://platon-network.medium.com/prc-12-fungible-token-standard-released-delegated-authorization-and-delegated-transfer-supported-925179c122f1