当前位置:网站首页>Development, deployment and online process of NFT project (2)
Development, deployment and online process of NFT project (2)
2022-06-26 15:45:00 【NFT practitioner】
Back end
In the parameter verification phase, two problems, i.e. parameter pre exposure and private key exposure, are mentioned , The corresponding solution is :
API protective
To prevent parameters from being exposed in advance ,API The end controls the parameter return condition :
- Return signature data according to the time stamp or starting block according to the project requirements
- Dynamically adjust return value structure , Or you can try to encrypt the data twice
Private key protection
Private key protection can start from two aspects :
- Provided by the server API Used to complete the process of parameter construction and signature , Avoid exposing the signing private key on the front end
- Sign at the test address before sale , The production address is enabled for signature at the time of sale
If you complete the above two steps, is it safe ? For most popular projects, yes , Because for popular projects, the public offering is basically sold out in a few minutes , Exaggeration may be short selling in several blocks , So there is not enough time left for scientists to crack . Then there is a long waiting time for the Dutch auction mechanism to be adopted , This method also fails , Because scientists have enough time to dock API Get the validation parameters to call the contract , Finally, the inventory will be wiped out at the expected price .
IP Limit
In addition, to prevent the same user from getting too many, you can target the same IP Limit the number of signatures , Prevent the same user from using different addresses to participate in the sale .
front end
The front end will be protected from the source code 、 Simulator and group control detection 、Cloudflare Set up three aspects to chat . The following schemes are some ideas , In terms of specific implementation, it is ultimately the project party and scientists who fight for wisdom and courage , It depends on who is better , Watch the great gods perform .

Source code protection
Completed the contract and back-end protection , For the front end, encryption can be used to improve the security of the business 、 confusion 、 compile 、 Packaging and other methods , The front-end partners may be familiar with this aspect . There is an idea as follows JavaScript obfuscator + bytenode + node-packer .
At the same time, the code of the logical part will be deployed a few minutes before the release , This makes it too late for scientists to extract more information from the front end . Don't forget to refresh after deployment CDN The cache of , Protect users from old caches . The following figure for Cloudflare Clear cached pages in :

It should also be noted that for the contract address and contract ABI Some encryption methods can be used to hide or confuse , For example, split multiple terminals and then base64, Avoid scientists from confusing the Js Through regular extraction .
Simulator and group control detection
In addition to the source code, the front end should also make some judgments about group control or simulator , For example, check the browser screen size , Judge Selenium This kind of automation plug-in , Generally speaking, this kind of plug-in will be in js Insert some functions and variables into the global variables , There are many detection schemes to try , There are many online resources, so I won't go into details here .
Cloudflare Set up
Cloudflare Some configurations in can help us improve our understanding of Bot The protection of , Of course, there are still some ways to crack it , There is no one size fits all policy , What we can do is to do our best to protect .
Bot Fight Mode
Need to buy Cloudflare Pro edition , The price for $20 / month .

Under Attack Mode
The launch phase starts Under Attack Mode Pattern , That is, the common five second shield is used to verify the validity of the request .

Legacy Captcha
If the degree of protection needs to be improved , Can be opened legacy captcha, But this will affect some user experiences , Explain to the user in advance that verification codes may be encountered, and some verification codes are difficult to identify .
The opening path is :Firewall Rules → Managed Challenge → Legacy CAPTCHA
边栏推荐
- Unable to download Plug-in after idea local agent
- Binding method of multiple sub control signal slots under QT
- Golang 1.18 go work usage
- 效率超级加倍!pycharm十个小技巧就是这么神
- Solana扩容机制分析(2):牺牲可用性换取高效率的极端尝试 | CatcherVC Research
- 【TcaplusDB知识库】TcaplusDB单据受理-创建游戏区介绍
- AUTO sharding policy will apply DATA sharding policy as it failed to apply FILE sharding policy
- Don't remove custom line breaks on reformat
- nanoPi Duo2连接wifi
- [tcapulusdb knowledge base] tcapulusdb doc acceptance - create business introduction
猜你喜欢

sqlite加载csv文件,并做数据分析
![[tcapulusdb knowledge base] tcapulusdb system user group introduction](/img/7b/8c4f1549054ee8c0184495d9e8e378.png)
[tcapulusdb knowledge base] tcapulusdb system user group introduction

Database - integrity constraints

Super double efficiency! Pycharm ten tips

AbortController的使用

IDEA本地代理后,无法下载插件
![[tcapulusdb knowledge base] tcapulusdb doc acceptance - Introduction to creating game area](/img/7b/8c4f1549054ee8c0184495d9e8e378.png)
[tcapulusdb knowledge base] tcapulusdb doc acceptance - Introduction to creating game area

Ansible自动化的运用

【TcaplusDB知识库】TcaplusDB单据受理-创建游戏区介绍
![[file] VFS four structs: file, dentry, inode and super_ What is a block? difference? Relationship-- Editing](/img/b6/d288065747425863b9af95ec6fd554.png)
[file] VFS four structs: file, dentry, inode and super_ What is a block? difference? Relationship-- Editing
随机推荐
[wechat applet] event binding, do you understand?
Function: crypto JS encryption and decryption
反射修改final
How do I open an account on my mobile phone? Is online account opening safe?
JS events
AUTO sharding policy will apply DATA sharding policy as it failed to apply FILE sharding policy
When a project with cmake is cross compiled to a link, an error cannot be found So dynamic library file
2022北京石景山区专精特新中小企业申报流程,补贴10-20万
Audio and video learning (I) -- PTZ control principle
Super double efficiency! Pycharm ten tips
Nanopi duo2 connection WiFi
【leetcode】112. Path sum - 113 Path sum II
Solana扩容机制分析(1):牺牲可用性换取高效率的极端尝试 | CatcherVC Research
【ceph】CephFS 内部实现(三):快照
【leetcode】701. Insert operation in binary search tree
Mr. Du said that the website was updated with illustrations
[applet practice series] Introduction to the registration life cycle of the applet framework page
High frequency interview 𞓜 Flink Shuangliu join
[CEPH] MKDIR | mksnap process source code analysis | lock state switching example
[file] VFS four structs: file, dentry, inode and super_ What is a block? difference? Relationship-- Editing