The Polygon Ecosystem Token is intended as an upgrade to the MATIC token. It consists of a token contract, migration contract, and an emission manager contract. Together, this set of contracts is proposed in PIP-17 to Polygon Governance as a step forward in functionality for the polygon ecosystem.
POL is broadly based on the MIT-licensed OpenZeppelin ERC-20 implementations which provide support for the default ERC-20 standard, along with some non-standard functions for allowance modifications. The implementation also provides support for EIP-2612: Signature-Based Permit Approvals-style is supported).
The POL token contract is not upgradable.
The migration contract allows 1-to-1 migrations between MATIC and POL using the migrate
and unmigrate
functions respectively. This migration contract is ownable, and the owner has the ability to disable the ummigrate
functionality. For both actions, EIP-2612 Permit-style is supported.
The role of the Emission Manager is to have the exclusive ability to mint new POL tokens. It has the ability to calculate token emissions based upon a yearly rate, and then dispurse them linearly to a configured target StakeManager
. For safety, there is a cap on the number of tokens mintable per second as defined by mintPerSecondCap
on the token implementation.
A default implementation is included and this contract will be proxy upgradable by Polygon Governance.
- Install foundry
- Install Dependencies:
forge install
- Build:
forge build
- Test:
forge test
Forge scripts are used to deploy or upgrade contracts and an additional extract.js script can be used to generate a JSON and Markdown file with coalesced deployment information. (see deployments)
-
Ensure .env file is set,
cp .env.example
-
source .env
-
Deploy using foundry
- (mainnet):
forge script script/Deploy.s.sol --broadcast --verify --rpc-url $RPC_URL --etherscan-api-key $ETHERSCAN_API_KEY
- (testnet, goerli for example):
forge script script/Deploy.s.sol --broadcast --verify --rpc-url $RPC_URL --verifier-url https://api-goerli.etherscan.io/api --chain-id 5
- Run
node script/util/extract.js <chainId> [version = 1.0.0] [scriptName = Deploy.s.sol]
to extract deployment information from forge broadcast output (broadcast/latest-run.json).
- Ethereum Mainnet 0x455e53CBB86018Ac2B8092FdCd39d8444aFFC3F6
- Goerli 0x4f34BF3352A701AEc924CE34d6CfC373eABb186c
Copyright (C) 2023 PT Services DMCC