Polymath 3.0 Developer Update #5

Pablo Ruiz
Polymath Network
Published in
6 min readDec 24, 2019

--

Welcome to the fifth issue of our developer updates for Polymath 3.0!
These regular updates are a great way to stay on top of what our developer team is working on, which is largely publicly available on our Github repositories.

As always, we’ll cover updates on these 4 categories:

  • Smart Contracts
  • SDK / CLI
  • Reference Implementations / Guides
  • The Token Studio Issuer dApp

Smart Contracts

Scheduled Checkpoints — by Satyam Agrawal

Many companies follow a regular dividend distribution policy, under which, the company will pay out dividends to its shareholders every certain or fixed amount of time. Dividends can be paid yearly, quarterly or monthly, and to achieve this, the issuer/admin has to regularly create a checkpoint on their Security Token. To overcome this burden we introduced a new module named ScheduleCheckpoint which allows the issuer/operator to create a schedule that will create the checkpoint automatically as per the given frequency.

Similarly, issuer can schedule the checkpoints for voting and for other functionalities that depend on checkpoint.

This module uses executeTransfer() functionality for the automatic creation of a checkpoint. Whenever a token holder transfers tokens the _update() function checks whether the current block time is greater than createNextCheckpointId, if yes, then a new checkpoint is created and nextTime for creation of checkpoint is calculated using frequency and frequencyUnit of the iterative schedule.

SDK/CLI

SDK Updates — by Jeremías Díaz

Full Support for STOs, Controller-only Operations and Dividends

Previous versions of the SDK already supported subsets of these feature suites (for example, launching an STO was supported, but investing in it wasn’t). The upcoming release will come with full feature coverage for STOs, Controller-only operations (operations like forced transfers and token burn which are only permitted to a special “controller” address) and Dividend Distributions.

Testing

A lot of our effort has been focused on increasing unit test coverage. The majority of the work has been done on Procedures (the Polymath SDK equivalent of a write operation or transaction), which are the bread-and-butter of the SDK.

Tiered STO

On the Contract Wrappers side (the low level package used by the SDK to interact with the smart contracts), we have finished adding support for Tiered STOs in different currencies other than the US Dollar. This feature will be added to the SDK properly in the upcoming weeks.

Transfer Restrictions

So far, the SDK only supported transfer restrictions in the form of KYC expiry and sell/buy lockup dates in the shareholders namespace. The latest release has added a new restrictions namespace, in which all transfer restrictions supported by the Polymath Protocol will live. At the moment, the restrictions supported by the SDK are:

  • Shareholder Count Restrictions — regulate the maximum amount of addresses that can hold the Security Token at a given moment.
  • Percentage Ownership Restrictions — regulate the percentage of the total supply of Security Tokens that a single address can hold at a given moment.

To play around with these restrictions (and their associated roles), you must first enable the corresponding features. Here is an example of how you would use the SDK to set a limit on the amount of investors that can hold your token at the same time:

Reference implementations — By Remon Nashid

Polymath React hooks

There are a couple of common patterns amongst all the standalone apps we’ve built so far. Namely, configuring Polymath SDK, detecting current user and network, fetching user security tokens and finally letting the user select a token to manage.

We’ve introduced two custom React hooks that encapsulate aforementioned patterns; usePolymathSdk() and useTokenSelector(). Go ahead and check out Polymath React. If you have used the SDK alongside React before, please let us know if there are any more patterns that can be abstracted.

Role management

Besides investor whitelisting, role management is one of the most common management tasks on your Security Token. Basically, the Polymath ecosystem provides a plethora of features (aka modules) that you can leverage. However, managing each of those features can be daunting for a sole token owner. To alleviate that management burden, token owner can use the GPM module, which lets them assign some or all token management tasks to 3rd party delegates, in a very granular manner.

The Role management app facilitates managing delegates and permissions via an ACL-like list. Like all our previous apps, this one depends on React.js and Polymath SDK. Check it out here and let us know what you think.

Token minting

Now that you’ve created your security token, whitelisted your investors, and maybe assigned some roles to 3rd party managers, you’ll probably need to mint tokens to your investors. While this is typically accomplished by one simple Ethereum transaction, that transaction can be complex if you want to mint to tens or hundreds of investors. Also, it might not be easy to stand on the current balance of all your investors.

For that reason we’ve created a sample minting app. Currently, it displays an exportable (ie CSV) list of investors, and also enables minting tokens via CSV sheet of investor addresses and the amount to mint for each. Check it out here.

Token Studio

Goerli support —by Remon Nashid

Now that Polymath smart contracts have been deployed to Goerli testnet, we added Goerli support to Token Studio as well. Now you can switch your current network via Metamask, and expect Token Studio to work just as expected.

Some parting words before we wrap up this fifth developer update for Polymath 3.0.
So far, we have been posting updates every two weeks, but moving forward we have decided to move to a monthly release schedule. The reason for this is that while it’s extremely exciting to be sharing updates so frequently, the reality is that it takes a lot of effort from our devs to write their pieces and with a two weeks frequency, most of the time, by the time we finished publishing one update and next thing you know is that you have to start writing the next one! With this move to monthly updates we expect to be able to give our readers higher quality content and updates.

So, the next update will come in the new year, with a lot of exciting new features for both our protocol on Ethereum as well as content for Polymesh. Stay tuned!

— Pablo Ruiz

Joining Polymath

Are you interested in joining the security token revolution? We are always looking for high quality talent. Check out our careers page at https://polymath.bamboohr.com/jobs/ to apply!

Follow us

Newsletter: https://polymath.network/newsletter
Reddit: https://www.reddit.com/r/PolymathNetwork/
Twitter: https://twitter.com/polymathnetwork
Telegram: https://t.me/polymathnetwork
Facebook: https://www.facebook.com/polymathnetwork/
Youtube: https://www.youtube.com/c/polymathnetwork
Website: https://polymath.network

--

--