The cause was CZ sharing his design concepts and model on the TW platform.
In less than a day, intensive coding was done.
The open-source code is at
https://github.com/PhiloCwh/cz_pump/tree/main/contracts
And a detailed video was recorded.
https://m.youtube.com/watch?v=pIjUve3ya-0
After writing for half a day, the code is complete. The above is a brief introduction and explanation of the code principles.
Interested projects can take it to launch, but beware of risks; the current code has not been audited.
Rough Mechanism
1. IDO
The project party specifies the amount of BNB for the IDO.
Concurrent Launch
Once the specified amount of BNB is raised, the process is as follows.
5% of the tokens and 50% of the raised BNB are added to PancakeSwap, with the LP token permanently locked in the contract.
50% of the raised BNB is sent to the project party, and the remaining 5% of the unlocked tokens are distributed to users participating in the IDO.
2. Unlock Mechanism
a. Requires 180 days after the last withdrawal.
b. The price must be double that of the last withdrawal.
(A better solution is to use TWAP to collect the weighted time price of this token, but it's quite complicated, and I want to sleep now.)
Unlocking can be achieved if conditions a and b are met; if not, it remains locked in the contract.