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.
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
: N is the number of orders under the grid strategy. Each grid order is canceled on-chain individually.
The trading fee rate for every trading pair is configured by the node operator. The current configuration rates are:
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.
ForceWithdrawis 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.