We are proud to release version 0.1 of the NEO NEP-5 ICO Template, which is now available on GitHub.

Basic instructions on compilation and usage are included with the project. This is an initial release and improvements are expected to be made in the near future. This template is the first of three components forming NEX token generation event (TGE) platform that are being open sourced. The remaining components will be launched during Q1 2018.

This article will cover the following improvements to current ICO template implementations that we believe are valuable to the greater NEO community:

Transaction rejection mechanism to eliminate or greatly reduce the amount of refunds necessary to operate a successful ICO

A KYC/AML Address enforcement mechanism

Full NEP5(.1) compatibility

Transaction Rejection

RPX was the first ICO on the NEO platform, and due to the overwhelming demand for the token, there were a high volume of users who submitted NEO to the ICO but did not receive tokens because the sale had concluded or they had missed their window of time. RPX used a system to track these events so that a refund could be made to users who did not receive tokens.

Because there was no automated system in place to process refunds, many users were nervous they did not immediately receive back their funds, and furthermore, a lot of work was needed to be done by the RPX team to manually process the refunds. Eventually all refunds were made, and apart from a few users who were disappointed they did not get tokens, the sale was a success.

One of the main features of this ICO Template, in conjunction with an upcoming release of the NEON wallet, is a system whereby the eligibility for a user to exchange their NEO or Gas for a token is determined in the Verification phase of the transaction. If a user submits a mintTokens request, but the sale has ended or they for some other reason do not qualify to receive tokens, the whole transaction is rejected, along with any funds sent along with it.

With this mechanism, the need to process refunds is almost completely eliminated. While there may be still be edge cases where a refund will be necessary, they will be much smaller. For these cases, NEX plans to implement an automated withdrawal mechanism, so that the user is not dependent on the contract operator to receive their refund. This process will be released when it is ready for testing and public usage.

KYC Address Enforcement

An important legal consideration for any ICO is adherence to Know Your Customer regulations. Any address that intends to participate in an ICO should be verified through a KYC service of some sort, which is outside of the scope of this article. However, once an address has been verified, it should then be eligible to participate in the ICO, and addresses that have not been verified should be disallowed. This template provides the following functionality to handle these needs:

crowdsale_register [addr1,addr2,...] This method provides an ICO operator with the ability to specify an address or list of addresses as eligible for the ICO.

This method provides an ICO operator with the ability to specify an address or list of addresses as eligible for the ICO. crowdsale_status [addr] This method allows a user to check the KYC status of their address.

This method allows a user to check the KYC status of their address. kyc_status(addr) This is a method used internally in the template to determine at runtime whether an address is eligible to participate in the token sale.

NB: The provided functionality is only an example of how compliance might be achieved. The exact implementation will depend on the regulations of your jurisdiction.

Full NEP5 Compliance

The initial NEP5 Token standard is in the process of being updated in order to provide functionality that will be necessary for advanced token interaction needed by exchanges or other dApps. This implementation (we may call it NEP5(.1)) has 1 key difference from the original. The following methods marked optional in the original implementation are now required:

transferFrom(from, to, amount)

approve(from, to, amount)

allowance(from, to)

This template provides an NEP5(.1) compliant implementation of these methods.

NB: Any token that wishes to be exchanged via a decentralized exchange such as NEX will need to implement these methods. If you are currently planning an ICO or token on the NEO platform, we strongly advise you to adhere to the proposed updated NEP5 standard.

Parting Thoughts

NEX is advancing ahead of its schedule and will be incrementally opening its components that are beneficial for the NEO ecosystem.

Regards,

NEX team.