polymath-core
polymath-core copied to clipboard
POLY Only Capped STO
I've marked this as WIP as some changes will be required when some of the current PR's are merged but it is ready for review if you have time. (hopefully before too many more changes are needed to keep up with you guys :smile:)
As I've mentioned before I'm not a developer but took an interest in learning solidity so gave myself this project which I think could be of value to Polymath as an open source contribution. I'm open to any comments, optimizations, change requests, criticism etc.
Please check if the PR fulfills these requirements
- [x] The commit message follows our Submission guidelines
- [x] Tests for the changes have been added (for bug fixes / features)
- [] Docs have been added / updated (for bug fixes / features)
What kind of change does this PR introduce?
This PR includes a new capped STO module "POLYCappedSTO" It has been update to a proxy deployment and is in line with the latest changes in dev-3.0.0. This STO module is based on a combination of the existing CappedSTO and USDTieredSTO.
Issuer can set a hard Cap in number of tokens, POLY to token rate, start time and end time as per the CappedSTO. This module is not tiered and only accepts POLY as the Fund Raise type so can be priced separately from modules that allow other funding options. Additional features include:
- A minimum Investment limit
- The STO supports accredited and non accredited investors and options to override the default limits for non accredited investors.
- A investment limit for non-accredited investors
- A setting maximum number of non-accredited investors
- Setting maximum number of non-accredited investors to 0 disables the limit. (Should an issuer want to disable non-accredited investors it can be done by no whitelisting them or the default non accredited limit can be set to 0 or less than the minimum investment limit)
- Option to finalize the STO at any time.
- Option to mint or not unsold tokens upon finalization.
- Records investment values in USD at the time of of investment for individual investors and total investment.
- Allows modification to all STO configuration parameters prior to commencement of the STO.
- Supports divisible and non-divisible tokens
- Includes a pre-purchase check function to allow the investor to check the number of tokens they will receive and amount they will spend based on limits associated with their address.
What is the current behavior?
N/A
What is the new behavior?
See above
Does this PR introduce a breaking change?
No
Any Other information:
I did some work on a CLI for this but recent commits will have broken it and as the CLI's need to be updated for 3.0.0 changes any way I've removed to avoid merge conflicts.
Thanks for reviewing. I've moved the files and I'll try to work through some of the other comments this evening if I get time.