TEPs icon indicating copy to clipboard operation
TEPs copied to clipboard

Referral code based on Query ID

Open oleganza opened this issue 1 year ago • 5 comments

This is a proposal to split query ID in two halves: app identifier and the random app data.

Specification

oleganza avatar Dec 26 '23 16:12 oleganza

Please add algorithm for creating first part. I suggest to user CRC32 IEEE like for tlb schemes. for example

crc32('tonkeeper') = 0x546de4ef
crc32('dedust') = 0xc671412d

mr-tron avatar Jan 18 '24 20:01 mr-tron

I think it need to be explicitly mentioned that this data can be used only for offchain analysis and can not be fully trusted.

EmelyanenkoK avatar Feb 14 '24 07:02 EmelyanenkoK

@mr-tron @EmelyanenkoK added notes as you suggested. Please review.

oleganza avatar Feb 26 '24 11:02 oleganza

looks cool for me.

But what is the impact for this to DeFi like STON.fi and DeDust?

I remember they use query_id in zero only I am afraid.

howardpen9 avatar May 12 '24 06:05 howardpen9

Second 32 bits (low bits) are reserved for arbitrary use: identifying individual queries in smart-contracts...

By the way, is there any onchain usecase which would allow to "identify individual queries" securely? I have not seen one so I guess main (and probably the only) usecase for query IDs is optimizing blockchain indexers.

ProgramCrafter avatar Jun 16 '24 07:06 ProgramCrafter