Protocol Fees
When using the DeGate protocol, users may need to pay different fees based on the features/services they are using.
- Gas Fees: There will be a gas fee cost for any executed operations that lead to the submission of zero-knowledge proofs to the Ethereum mainnet. After many rounds of simulation, the DeGate protocol has defined the amount of gas required for each operation. Before a user executes an operation, there will be a calculation of the amount of gas fee the user has to pay and this is based on the current network gas price and ether's price. Currently, ETH, USDC, and USDT are supported to pay for the gas fees.
- Trading Fees: A trade comprises a maker and a taker order. For DeGate, only the taker is required to pay trading fees and the fees will be debited directly from the received trade amount. Different trading pairs have different trading fee rates. Using the DG/USDC trading pair as an example and a user placed a market order to buy 1000 DG. Assuming that the trading fee is 0.1%. Being the taker of the trade, the trading fee of 1 DG (1000*0.1%) is charged and the user ultimately receives 999 DG from the trade. All trading fees are collected into the DeGate HomeDAO Treasury.
Operation | Gas Fee | Trading Fee | Description |
---|---|---|---|
Trade | Yes | Yes | Fully incurred by taker |
Grid Strategy Trade | - | - | All orders under a grid strategy are maker orders |
Deposit | - | - | Subsidised by the node operator of the protocol |
Withdrawal | Yes | - | |
Transfer | Yes | - | Additional fee will be charged by the party that transfers asset to an unregistered DeGate account |
Account Registration | - | - | Subsidised by the node operator of the protocol |
Reset Asset Private Key | Yes | - | |
On-Chain Order Cancellation | Yes | - | |
On-Chain Grid Cancellation | Yes | - | All orders in a grid strategy can only be canceled collectively. The total gas fees is the number of orders * single on-chain order cancellation |
Create Trading Pair (Add to glossary list) | Yes | - | Zero-knowledge proof is not required for creating new trading pairs. The gas fee is charged to hinder attack on the protocol |
Claim Mining Rewards | Yes | - | Mining rewards are received through the transfer function |
Every off-chain transaction is configured with a gas amount (GasUsage) whose value is determined based on the computation of running the transactions in many rounds of simulation. When the user initiates a request, the computation for the necessary gas fee amount for ETH, USDC, and USDT is based on the current network gas price (GasPrice) and ETH price (ETHPrice).
ETH = GasUsage * GasPrice
USDC = GasUsage * GasPrice / ETHPrice
USDT = GasUsage * GasPrice / ETHPrice
Operation | Gas Usage Amount |
---|---|
Trade | 800 |
Deposit | - |
Withdrawal | 58393 |
Transfer | 2225 |
Transfer to New Account | 22422 |
Register Account | - |
Reset Asset Private Key | 20197 |
On-Chain Order Cancellation | 2393 |
On-Chain Grid Cancellation 1 | N * 2393 |
Create Trading Pair | 100 |
Note : N is the number of orders under the grid strategy. Each grid order is canceled on-chain individually.
1
The trading fee rate for every trading pair is configured by the node operator. The current configuration rates are:
Trading Pair Type | Example | Trading Fee Rate |
---|---|---|
Stablecoins | USDT/USDC, DAI/USDC | 0.01% |
Others | ETH/USDC, DG/USDT | 0.05% |
In order to prevent the node operator from adjusting the trading fee rates randomly at will, there is a parameter for the maximum trading fee rate in the DeGate smart contract. If the actual trading fee rate is higher than the maximum parameter value, the trade verification will not succeed when it is submitted to the smart contract. In addition, there is a 7-day delayed effect each time the maximum trading fee rate is modified, offering sufficient heads-up for users to react.
Every deposit transaction requires a gas fee to generate the zero-knowledge proof. Currently, the node operator is subsidizing this fee that exempts the user from paying the processing fee for deposit. However, there is also a need to have a protective mechanism in place to prevent an attack on the protocol through the misuse and abuse of the subsidy benefits. Users will be required to pay the appropriate ETH amount as the gas fee for the processing fee of deposits if the upper limit of the subsidy set by the protocol is fully utilized.
- Standard Deposit: The gas fee can be paid either from the DeGate account or from the user's wallet. The payable gas amount will be computed based on the current network's gas price
- Advanced Deposit: The gas fee can only be paid directly from the user's wallet. The payable gas amount has been configured in DeGate's smart contract. The node operator has the ability and authority to adjust the required gas fee amount.
ForceWithdraw
is a function in DeGate's smart contract that interacts directly with the user's wallet. Calling this function will require a specific amount of ETH, up to a maximum of 0.25 ETH. This parameter is configured in DeGate smart contract and the node's operation team has the authority to adjust the required gas fee amount.
All gas fees and trading fees incurred in DeGate are transferred to the DeGate account (AccountID = 1) opened by the node operator and will be able to redeem assets in the account.
Last modified 29d ago