Blacklist Transfer Manager (BTM)

Introduced in

3.0.0

Contract name

BlacklistTransferManager

Type

Transfer Manager Module

Compatible Protocol Version

^3.0.0

How it works

This module allows approved employees/issuers to create and establish an automated blacklist to prevent insider investors from selling thus de-risking price swings during time-sensitive cases like earning calls. The blacklists can automatically become active/inactive at set recurring intervals.

Key functionalities (as defined in the Smart Contract)

Initialization

This module does not require any initialization.

Execute Transfer

Summary:

  • If the module is paused or no blacklist is imposed on the sender, the transfer restrictions are skipped for that specific transfer.

  • The module works by parsing through all the blacklists applied to the sender and returns the invalid transfer if any of the blacklists is currently active.

  • Transfers are allowed to go through if none of the blacklists applied on the sender are active at that current moment.

Managing blacklist types

Admins can add a new blacklist, modify an existing blacklist or delete a blacklist at any time using the below functions

Note:

  • _startTime is the timestamp of the beginning of the first instance of the blacklist.

  • _endTime is the timestamp of the end of the first instance of the blacklist.

  • _repeatPeriodTime is a number of cooldown days after which the blacklist should be reactivated. If the

  • _repeatPeriodTime == 0 makes the period non-repeating.

  • _name is the name of the blacklist type.

Add Blacklist Type

Summary: This function is used to add the specified blacklist type.

Add Blacklist Type Multi

Summary: This function is used to add multiple blacklist types in one transaction while having the same permission as addBlackListType().

Requirements:

  • _startTimes.length == _endTimes.length

  • _endTimes.length == _blacklistNames.length

  • _blacklistNames.length == _repeatPeriodTimes.length, "Input array's length mismatch"

Modify Blacklist Type

Summary: This function is used to modify the details of a given blacklist type.

Requirements:

  • blacklists[_blacklistName].endTime != 0, "Blacklist type doesn't exist"

Modify Blacklist Type Multi

Summary: This function is used to modify multiple existing blacklist types as well as allow it to have the same access permission as modifyBlacklistType().

Requirements:

  • _startTimes.length == _endTimes.length

  • _endTimes.length == _blacklistNames.length

  • _blacklistNames.length == _repeatPeriodTimes.length, "Input array's length mismatch"

Delete Blacklist Type

Summary: This function allows the issuer to delete the existing blacklist type.

Requirements:

  • blacklists[_blacklistName].endTime != 0, "Blacklist type doesn’t exist"

  • blacklistToInvestor[_blacklistName].length == 0, "Investors are associated with the blacklist"

Delete Blacklist Type Multi

Summary: This function is used to delete the multiple blacklist types in a single transaction.

Applying blacklist to investors

Allows admins to add or remove users from blacklists at any time using listed functions below:

Note:

  • _investor is the Ethereum address of the investor.

  • _blacklistName is the name of the blacklist.

Add Investor to Blacklist

Summary: This function is used to assign a specific blacklist type to an investor. The _blacklistName should be pre-existing in the contract storage, otherwise, the transaction will fail.

Requirements:

  • blacklists[_blacklistName].endTime != 0, "Blacklist type doesn't exist"

  • investor != address(0), "Invalid investor address"

  • investorToIndex[_investor][_blacklistName] == 0, "Blacklist already added to investor”

Add Investor to Blacklist Multi

Summary: This function is used to assign the blacklist type to multiple investors.

Add Multi Investor to Blacklist Multi

Summary: This function is used to assign the multiple blacklist type to multiple investors.

Requirements:

  • _investors.length == _blacklistNames.length, "Input array's length mismatch"

Add Investor To New Blacklist

Summary: This function is used to assign the new blacklist type to an investor. It works by creating a new blacklistType and assign it to the investor.

Delete Investor From All Blacklist(s)

Summary: This function is used to delete the investor from all of the associated blacklist types.

Requirements:

  • investor != address(0), "Invalid investor address"

Delete Investor From All Blacklist(s) Multi

Summary: This function is used to delete multiple investors from all the associated blacklist types.

Delete Investor From Blacklist

Summary: This function is used to delete the investor from the blacklist

Requirement:

  • _investor != address(0), "Invalid investor address"

  • _blacklistName != bytes32(0),"Invalid blacklist name”

  • investorToBlacklist = blacklistName, "Investor not associated to the blacklist"

Delete Multi Investors From Blacklist Multi

Summary: This function is used to delete multiple investors from a blacklist.

Requirements:

  • _investors.length == _blacklistNames.length, "Input array's length mismatch"

Get List Of Addresses

Summary: This function allows the issuer to get the list of the investors of a blacklist type.

Requirement:

  • blacklists[_blacklistName].endTime != 0, "Blacklist type doesn't exist"

Get Blacklist Names To User

Summary: This function allows the issuer/employee to get the list of the investors of a blacklist type.

Get All Blacklists

Summary: This function allows the issuer to get a list of all the blacklist names.

Summary: Use to get the balance of token holder for a given partition

Special considerations / notes

  • function addInvestorToBlacklistMulti is limited by GAS limit and can only process the maximum number of address at a time.

  • To set a non-recurring blacklist, _repeatPeriodTime can be set to a zero.

  • All investors must be removed from a blacklist before that blacklist can be deleted using deleteBlacklistType function.

Last updated

Was this helpful?