Skip to content

PToken

PToken.sol is a ERC20 smart contract. When the factory contract deploys the pool, the pool deploys 3 PTokens described in Components of Potentia.

PToken minting and burning are exclusive functions of the pool. All other operations, such as transfer, decimals, and balanceOf, adhere to the standard ERC20 standard.

1. mint

solidity
function mint(address _to, uint256 _amt) external virtual onlyOwner

This functions mints PToken to the caller's address. This can only be called by the pool and can not directly be called by the traders.

Parameters

NameTypeDescription
_toaddressAddress of the caller
_amtuint256Amount of PTokens to mint

2. burn

solidity
function burn(address _from, uint256 _amt) external virtual onlyOwner

This functions burns PToken. This can only be called by the pool and can not directly be called by the traders.

Parameters

NameTypeDescription
_fromaddressAddress of the caller
_amtuint256Amount of PTokens to burn