01 Mar Polymath and Loopring Complete ST-20 Security Token Trading Tests
Polymath, the securities token platform, and Loopring, the decentralized exchange protocol, announce a successful peer-to-peer test trade of ST-20“security” tokens through Loopring protocol smart contracts.
Polymath and Loopring demonstrated that an authorized trade of ST-20 security tokens was able to execute, while an unauthorized trade of ST-20 security tokens was not able to execute.
Here, we can see an authorized transfer of the ST-20 token named “Cammazol”: https://etherscan.io/tx/0xfc48d28f50781b9931ee3b7a0682b5fbd58168acda96ef851ff75701d6fdaadb#eventlog
And here, we can see an unauthorized, failed transfer of the ST-20 token named “Cammazol”: https://etherscan.io/tx/0x802505de2052fcb8766e4218f77a3135ab4984c0923b43c63bdb61d9b8b6a375#eventlog
ST-20 tokens can only be held and traded if certain criteria are met. To hold ST-20 tokens, wallet addresses must be added to a “whitelist” controlled by the token issuer, and tokens can only be traded if the protocol determines there are no restrictions currently in place (buy or sell lockups, for example). ST-20 security tokens created through Polymath are therefore able to maintain regulatory compliance even when traded peer-to-peer utilizing a decentralized exchange protocol such as Loopring.
One of the promises of a tokenized future is the ability for counterparties to connect and efficiently exchange all types of value — such as money, digital resources, and securities. Blockchain-based securities enable a foundational shift in the life-cycle of traditional financial assets, as well as a completely new design space for blockchain-native securities.
Of the many benefits tokenization offers, the Loopring team feels that two of the most exciting are:
1) Asset Interoperability — assets being able to speak with/flow across the entire Ethereum ecosystem, and
2) Programmability — being able to code bespoke securities logic and jurisdictional considerations.
Ultimately, these benefits filter down into more liquid markets for issuers and investors.
With this in mind, platforms like Polymath aim to enable the creation of trillions of dollars worth of securities on the blockchain, while Loopring seeks to allow these securities to move fluidly in a non-custodial, global, and perfectly auditable manner.
Whereas utility tokens most often take form as ERC20 compliant tokens, the community has been working towards security token standards built specifically to handle the extra logic and considerations required for securities. The ST-20 standard, which is Polymath’s implementation of ERC1400, The Security Token Standard, is one such example. Loopring also supports ERC1400, the more generalized standard, with an explanation found here.
Every time an ST-20 token is traded, certain checks are made to ensure validity. The “Transfer Manager” checks to ensure that the seller (the wallet address sending ST-20 tokens) is able to sell, and the buyer (the wallet address receiving ST-20 tokens) is able to buy. When both those criteria are met, the transfer occurs. If both those criteria are not met, the transfer fails. The Transfer Manager in conjunction with the “whitelist”, which contains Ethereum wallet addresses and information associated with those wallet addresses such as buy and sell lockup restrictions and KYC/AML refresh dates, allow issuers to navigate appropriate regulations.
The trading tests conducted by Polymath and Loopring were between Wrapped ETH (WETH) and Cammazol, a token compliant to the ST-20 standard. The trade occurred by accessing the Loopring Protocol 2.1 smart contracts directly. ST-20 is 100% compatible with the Loopring 2.1 smart contracts interface/order data — no need to set the token type, as the smart contract checks if the extra verifyTransfer() function exists. For this test token, there is only a single TransferManager module attached, so the only transfer restrictions are based on whether an address is whitelisted or not. Similar logic is enforced for Loopring ERC1400 support.
We performed two trades. In the invalid trade, we detect with verifyTransfer that the destination address isn’t whitelisted, and throw an InvalidRing event without failing the transaction. This means that if there were other rings in the transaction they would still settle.
This capability of settling multiple rings per transaction was added in Loopring protocol 2.0. A ring contains 2 to 8 orders which are matched in circular, combinatorial fashion. This allows DEXs to more efficiently match orders, as the protocol can batch all kinds of things like token transfers, state updates, etc. We make sure that all token transfers for a ring will be successful by checking available balances, and also checking with verifyTransfer for ST-20 tokens. If a ring cannot be settled for any reason, we emit an InvalidRing event and skip the ring.
Other reasons for a potential Invalid transfer besides addresses not being whitelisted are if the transfer would result in more investors holding the token than is allowed according to the security’s structure.
This programmable logic is an important improvement for the current private securities stack, especially as it pertains to secondary trading. With the ST-20 standard, the burden of manually and constantly handling compliance is removed.
While the ability to trade security tokens across non-custodial exchanges is exciting, the greatest possibilities may come from those combining Polymath issuance and Loopring trading into one platform or product — a full-suite service capable of handling the entire tokenized securities lifecycle. Decentralized exchanges such as Dolomite may be able to further enhance their trading and portfolio management tools by offering users a security token portal as well — subject to appropriate regulatory licensing.
From this portal, asset owners and issuers can compliantly organize, launch, and manage their offerings, while having a built-in venue to engage investors and facilitate trade. Investors, on the other hand, would be able to easily access the extra information surrounding their security tokens, such as any rights or restrictions, and be able to trade directly from their wallet.
(This article is originally posted on Polymath Blog.)