Initial commit

This commit is contained in:
Yaser
2026-08-13 19:50:53 +03:30
commit 38084458fe
879 changed files with 95198 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

View File

@@ -0,0 +1,43 @@
# Wallet types
![image](wallets.jpeg)
## 1. Deposit
This wallet is the first place to store users' property.<br />
we generated new addresses from this wallet for users,
so users can send their crypto coin to these addresses.
these addresses are keeping in local DB.<br/>
so the blockchain daemon fetch stream block and recognizes a relevant transaction by these addresses
## 2. Fee
Use this wallet for calculate and pays the fee for (ERC20 case)
![image](fee_wallet.jpeg)
## 3.Hot 4.Warm 5.Cold
#### Deposit process
If the deposit equal or higher than 'Min collection amount' the system initialise a deposit collecting process to move funds from the deposit wallet to exchange wallet/wallets ('Hot', 'Warm' or 'Cold').<br/>
That process requires a few checks: <br />
- If a sum of the deposit + 'Hot wallet' balance lower than 'Max balance' of 'Hot wallet' then the system moves the deposit to 'Hot wallet'
- If a sum of the deposit + 'Hot wallet' balance is higher than 'Max balance' of 'Hot wallet' then the system checks next conditions.- If a sum of the deposit + 'Hot wallet' balance + 'Warm wallet' balance lower than a sum of "hot" and "warm" wallets max balances then the system checks next conditions.
- If 'Hot wallet' reached max balance the system moves deposit to 'Warm wallet'
- If 'Hot wallet' hasn't reached max balance the system divides the deposit between 'Hot wallet' and 'Warm wallet'.
- If a sum of the deposit + 'Hot wallet' balance + 'Warm wallet' balance higher than a sum of "hot" and "warm" wallets max balances then the system does next checks:
- If 'Warm wallet' reached max balance the system moves deposit to 'Cold wallet'
- If 'Warm wallet' hasn't reached max balance the system divides the deposit between 'Warm wallet' and 'Cold wallet'.
#### Withdraw process
- User creates a withdrawal request.
- System checks if the user has enough funds to proceed withdrawal transaction. If the user doesn't have enough funds, the system reject to create withdrawal request.<br/>
If the user has enough funds, the system accepts that request and do the next checks.
- If the user hasn't reached any withdrawal limits, the system process the withdrawal request automatically from 'Hot wallet'. If 'Hot wallet' doesn't have enough funds to process the withdrawal request the system throw error.<br/>
In this situation, the admin needs to replenish 'Hot wallet'.
- If the user reached at least one of withdrawal limits (24h or 72h) the system accepting that request but doesn't process it automatically. <br/>
Admin can manually reject or process that withdrawal request from 'Hot wallet'.
- Withdrawal request for a big amount can be processed manually by the admin. Big withdrawals should be processed outside the system, from 'Warm wallet'.<br/>
When the admin have generated and signed withdrawal transaction he has to propagate that transaction to the network. After transaction propagation admin has to upload TxId into the admin panel.<br />
If there are not enough funds in 'Warm wallet' to process the withdrawal request the admin needs to replenish 'Warm wallet' from 'Cold wallet' (transaction signing should be done offline).
![image](peatio_wallets.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB