Transfer-manager-results

A transfer manager module in Polymath core can return one of the four predefined results: 1. INVALID: The transfer should not be allowed (INVALID Trumps VALID) 2. NA: The result from this TM is ignored 3. VALID: The transfer is valid 4. FORCE_VALID: The transaction will always be valid, regardless of other TM results (FORCE_VALID Trumps INVALID)

The transfer managers are mainly of three types: 1. Transfer scanners: These modules keep an eye on all the transfers but don't participate in deciding if a transfer is valid or not. These modules should always return NA during verification/execution of transfers. ScheduledCheckpoint module is one of the Transfer scanners. 2. Whitelist transfer managers: Modules like manual approval transfer managers and general transfer manager fall under this category. These modules usually deal with KYC and whitelisting of addresses and return VALID if the sender and receiver are whitelisted. These modules return NA instead of INVALID when they don't have users' info as some other Whitelist module may have the relevant data. Only one such module needs to return VALID for the transfer to be deemed valid. 3. Blacklist transfer manager: Modules like count transfer manager and volume restriction transfer manager are examples of blacklist transfer managers. These modules are used to add restrictions to transfers. If a restriction is triggered, these modules return INVALID, and if no restriction is triggered, these modules return NA. Blacklist transfer managers don't explicitly approve any transfers. They just make sure that the transfer is not invalid. If even a single restriction is triggered and a module returns INVALID, the transfer is deemed invalid.

NOTES: 1. FORCE_VALID is currently not used by any module, but it can be used in a case where some transfer managers aren't playing along as needed, or Issuer wants to override the transfer restrictions. 2. Smart contracts currently don't differentiate between different types of transfer managers. These classifications are only for developers to understand the logic better.