CIP: 12 Title: Memo Requirement through Broadcasts Authors: Jeremy Johnson Discussions-To: https://counterpartytalk.org/t/memo-requirement-through-broadcasts/3147 Status: Active Type: Standards Created: 2017-06-07
Any user should be able to mark an address under their control as memo-required. The protocol should track this memo requirement and prevent any sends to the address without a memo.
To lessen end user support costs by enforcing a memo requirement at the protocol level.
CIP9 allows for specifying a memo in a send transaction, which can reduce the FEES cost for exchanges by allowing customers to make deposits directly to an exchange hot-wallet. The data in the 'memo' field is used to associate a transaction with a specific customer, and removes the requirement that each customer have their own deposit address. However, there is still a non-trivial SUPPORT cost associated with tracking down customer deposits without a memo.
By allowing an exchange to mark their address as memo-required, and rejecting sends without a memo, they are able to reduce their support costs.
Enforcing a memo requirement at the protocol level also has the added benefit that it can discourage predatory behavior by exchanges, such as allowing sends without a memo, and ignoring any support requests by customers who made a deposit without a memo.
There will be a 'special' broadcast message that is used to set address options;
INTEGER: a bitwise operation that identifies the desired options
The REQUIRE_MEMO flag (bit one) may be turned on or off as many times as desired with successive OPTIONS broadcast messages.
LOCKed broadcast feed
Counterparty has a feature to broadcast the text
LOCK to prevent any further broadcasts from that address ever being considered valid.
OPTIONS messages broadcast from an address with a
LOCKed broadcast feed will be ignored.
addressestable with the following definition:
CREATE TABLE addresses ( address TEXT UNIQUE, -- address options INTEGER -- bitwise address flags (the REQUIRE_MEMO option is represented by the first bit) );
Note: The maximum INTEGER stored in sqlite is 64 bits
- When validating a send attempt (send.validate):
- Check if destination address requires memo
- Check if transaction has a memo included
- When parsing a broadcast (broadcast.parse)
- Check for
OPTIONS <INTEGER>as the broadcast text
- Verify that address is not LOCKed by checking for previous LOCK broadcast
- If INTEGER is greater than than the maximum flag used, then the OPTIONS broadcast will be ignored. As of CIP 12, only 1 or 0 are accepted.
- Create/Update record in
addressestable and set OPTIONS
- Check for
Fundraising Goal = 150 XCP
Milestone #1 (80% - 120 XCP) Implementation of memo requirement in Counterparty-lib with all necessary unit tests.
Milestone #2 (20% - 30 XCP) Release of memo requirement to mainnet.
Bounty Address : 1NxHtYgzD9MYWckgVC7cEUeH9vuMyPvkdD
This document is placed in the public domain.