BEPs
BEPs copied to clipboard
Whitelist Script for BEP12
Changes
Transactions can send money to the wrong address, causing immediate loss of value. A whitelist could be useful for a wallet or service to protect against mistake transfers, as an additional safeguard. This also proposes transactions for adding to the whitelist or removing from it. Reviewers @huangsuyu
I pushed a commit to make the parameters plural, which I see as an improvement, though it may complicate the fee structure. git revert be37795
if unwanted.
Proposed fee structure
To account for the increase in state size, adding whitelisted addresses should cost more per-account. However, because removing whitelisted accounts trims the state size, removing blacklisted accounts should have a smaller, flat fee.
Overhead would depend on the node implementation. If the account is amino-encoded, for example, there is no extra space for null fields.
On Tue, Jul 30, 2019 at 1:13 AM huangsuyu [email protected] wrote:
@huangsuyu commented on this pull request.
In BEP12.md https://github.com/binance-chain/BEPs/pull/41#discussion_r308588239:
- }
- if ! isSender(tx, addr) {
return nil
- }
- if ! isRecipientWhitelisted(addr, tx) {
return err("recipient not whitelisted")
- }
- return nil +} +```
+#### New Transaction: WhitelistRecipients +A node should reject the transaction if any of the accounts are already whitelisted by this sender. + +Parameters for adding whitelisted recipients:
We need to allocate extra space for whitelist storage. It will be a scability issue.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/binance-chain/BEPs/pull/41?email_source=notifications&email_token=AAGDGVKOK4BL3QDCPENOH53QB7Z2JA5CNFSM4IHNW35KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB76MLEA#pullrequestreview-268223888, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGDGVK6IQBC32WNCSWN2ZTQB7Z2JANCNFSM4IHNW35A .
Overhead would depend on the node implementation. If the account is amino-encoded, for example, there is no extra space for null fields.
@huangsuyu means that this feature requires not only a validation script but also extra storage for saving whitelist.
Overhead would depend on the node implementation. If the account is amino-encoded, for example, there is no extra space for null fields.
@huangsuyu means that this feature requires not only a validation script but also extra storage for saving whitelist.
added
why cannot this be implemented on client side, i.e. wallets or signing service? They are more flexible to add more features, e.g. different group of white list can accept different size of fund, or an address book that can associate address with monikers to select.
Storing on chain cost token and actually exposes more privacy information of the addresses relationship. I don't think many people are interested.
@darren-liu We (TrustToken) are interested in this as an additional layer of defense for our mint security, and have used a similar system on Ethereum in the past.
outdate, archive it.