Preminted tokens are allocated to early & community contributors, company, team and agencies. Detailed can be found in our blog post at https://blog.zilliqa.com/more-details-on-zilliqas-token-generation-event-4e1b78e0cf5a.
Our token generation smart contracts have already been audited by ChainSecurity and
Zero Knowledge Labs. The audit reports can be found at
https://docs.zilliqa.com/ChainSecurity-Zilliqa-Audit.pdf and https://docs.zilliqa.com/ZKLabs-Zilliqa-Audit.pdf or in the folder named audit-reports
.
-
Deploy
ZilliqaToken.sol
. The listing can be done by a standard private key or a multi-sig key, which is the owner of the contract. The Zilliqa token, inheriting from custom PausableToken, gets deployed by this contract. An admin account address and the total amount of tokens are passed and used to initialize the Zilliqa token. Token transfers are initially only allowed for the owner of the contract and admin account. -
The pre-minted tokens are initially assigned to the owner's account. They may be then sent to the admin address (Bitcoin Suisse). The admin account may also transfer tokens initially. No other public account can send/receive during this period.
-
The admin address should distribute the tokens to individual contributor accounts during this period.
-
At some time
T1
,token.pause(false, false)
may be called which will enable transfers of the zilliqa token for everyone. -
At some time in the future,
token.pause(true, true)
may be called by the owner. This would stop all transfers for everyone (public, admin and owner). Only token burning would be allowed at this stage.
In /migrations/2_deploy_contracts.js
, we may specify the admin account address and total number of tokens. E.g.
var admin = "0x123";
var totalTokenAmount = 200;
To test on the Ropsten network, execute truffle migrate --network ropsten
which uses the existing API keys in /truffle.js
.
To deploy on mainnet, execute truffle migrate
.
The system has 1 main module - the token module.
Implemented in ZilliqaToken.sol
. The token is fully compatible with ERC20 standard, with some additions:
-
It has a burning functionality that allows user to burn their tokens. To optimize gas cost, an auxiliary
burnFrom
function was also implemented. This function allows sender to burn tokens that were approved by a spender. -
Only the owner and admin accounts are allowed to transfer tokens before the transfer period starts. No token transfer would be allowed after calling
pause(true, true)
in the future.
There are 2 flags, pausedPublic
and pausedOwnerAdmin
.
-
In the initial stage,
pausedPublic
istrue
andpausedOwnerAdmin
isfalse
. This means only the owner and admin can transfer tokens. -
In the second stage,
pausedPublic
andpausedOwnerAdmin
both arefalse
. Everybody can transfer tokens in this stage. -
In the final stage (lock up),
pausedPublic
andpausedOwnerAdmin
both aretrue
. Nobody can now transfer tokens. -
Tokens can be burnt at any time by anyone.
-
Only the owner and admin accounts are allowed to transfer tokens before the transfer period starts. No token transfer would be allowed after calling
pause(true, true)
in the future.
We use open-zepplin code for SafeMath
, Ownable
, StandardToken
and Pausable
logic.