neo-project / proposals

NEO Enhancement Proposals

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replace NEP-7 by token standard

igormcoelho opened this issue · comments

I believe NEP-7 (Triggers on NeoContract) can be fully replaced by a new token standard that allows recipient verification.
This standard would require users to validate receiving funds, if they require that. This is useful and necessary for many real-world situations, for compliance reasons. It could even make things a lot safer in blockchain world, by avoiding tokens to be burned when sent to wrong addresses (see neo-project/neo#195).
This standard would require a user to explicitly set receiving flag to true (and proving its ownership of the empty account), before receiving assets. So, by default, it will be impossible to burn tokens sending them to random accounts because no one will even own them (we can leave a special one for burning, like 00000....0000 which reduces total supply).
Some nice options could also exist, for example: receiveOnce (once received, lock mechanism goes to false again); allowAirdrops (this would allow receiving tokens marked as airdrop flag), etc.

I believe VerificationR won't be necessary anymore for Neo 3.0, and this token NEP-7 does a better job. I haven't thought yet about ApplicationR, any ideas?

@coranos what do you think about this?

@jsolman I think we may impose here the self-validation of assets, and perhaps this may be the "standard" basis for Native Neo/Gas.

sounds good to me. If you have to prove ownership of an account before receiving funds, it mitigates the problem we had with lost funds sent to ledger.

https://github.com/neo-project/neo/blob/3a06f9c0efcc3cc267d380bb945fe7474b1f2243/neo/Network/P2P/Payloads/TransactionAttributeUsage.cs#L10

I think you can simply add the receiver's address as a Script attribute to the transaction. Then the transaction will need the receiver's witness to be confirmed.