DeepTrade: Protocol Fees On Canceled Limit Orders?
Hey guys! Let's dive into a critical issue that has surfaced within the DeepTrade protocol: unexpected fees being charged on limit orders that were never executed. This discovery raises significant concerns and warrants a thorough examination to ensure fair trading practices. This article will break down the issue, analyze the evidence, and discuss the implications for traders.
Summary of the Issue
At the heart of the matter, unexecuted Post Only limit orders are incurring protocol fees, ranging from 0.075% to 0.137%. According to the official DeepBook V3 documentation, these fees should only apply to trades that have been successfully executed. This discrepancy between the documented behavior and the actual behavior is the key problem we need to address.
Why is This Important?
Unexpected fees can erode traders' profits and create uncertainty about the true cost of trading. It's crucial to resolve this issue to maintain trust in the DeepTrade platform and ensure a transparent trading environment. Imagine placing a limit order, thinking you're only risking gas fees if it doesn't fill, and then getting hit with a hefty protocol fee! That's not cool, and we need to get to the bottom of it.
Environment and Context
To understand the scope of the problem, let's look at the environment where these issues were observed:
- Platform: deeptrade.io
- Wallet:
0xa46617da774561178446eb08a91c422427a9b079c56304e6fbc8328a21862d89(This specific wallet was used for observation but the issue might affect others.) - Dates: October 30-31, 2025 (This timeframe helps narrow down when the issue occurred.)
- DEEP Staking: None (DEEP staking status can influence fees, so this is an important detail.)
- Order Type: Post Only limit maker orders (Post Only orders are designed to add liquidity and should not incur fees if they don't execute.)
What are Post Only Limit Orders?
For those who aren't familiar, Post Only limit orders are a type of order that ensures you only add liquidity to the order book. They will only be executed if they don't immediately match with an existing order. This is beneficial because makers (those adding liquidity) typically pay lower fees than takers (those removing liquidity).
Transaction History: The Evidence
To illustrate the issue, let's examine a detailed transaction history. The table below provides a clear picture of the placed and canceled orders, along with the associated USDC changes.
| Transaction Hash | Date (UTC) | USDC Change | Order ID | Market | Action |
|---|---|---|---|---|---|
2kMfBFaZiCKYsQeLGcab1bUJWUtKsHgh3jHoiRRDDn7f |
Oct 31, 2025 20:19:00 | +10,014.502500 | 922521671144661420389868722210 | xBTC-USDC | CANCEL |
AxNBpirqGkAbgeYRPkqk2pmvKsAEw9XVsvocJsBZ2i4A |
Oct 31, 2025 20:18:27 | -10,022.004000 | - | xBTC-USDC | PLACE |
9CD8Up2GEdp29dDCyBovkFa2t2fBy4QFVRqaDDVvfytK |
Oct 31, 2025 20:17:52 | +9,993.695024 | 276885646993124443453501187 | NS-USDC | CANCEL |
u2ypxcAsSvhX4ZbqYnHmaeSWhEHVJeRk4g5gRkisjnf |
Oct 31, 2025 20:17:12 | +2,489.393798 | 224312407954754891724268725825 | xBTC-USDC | CANCEL |
GyJG5F9wkvinrU91HNeDMCpUz22V4Vd9445gBDS27bCb |
Oct 31, 2025 14:02:10 | -10,007.427740 | - | NS-USDC | PLACE |
4V6ryGtLbeHvyV13AMHC9dV9PAtYTME28nUU7EQ4N62J |
Oct 31, 2025 14:00:52 | +10,007.800724 | 276885646993124443453506384 | NS-USDC | CANCEL |
GdewvPDDHPMQAUrwhUA3JpM19of1y1d1QWcRZoZWFUTv |
Oct 31, 2025 14:00:15 | -2,486.563265 | - | xBTC-USDC | PLACE |
HQJRFZ5rvbtppKYZpacHd4Qnq5sw5GptFmWRrUgFSsVS |
Oct 31, 2025 13:57:37 | +2,496.230109 | 223943473073280700691948735502 | xBTC-USDC | CANCEL |
3so5nheCyzztrFqWoRMq4K5Cq7nV91FHbP4rdpNfLmpM |
Oct 30, 2025 21:33:25 | -2,489.689131 | - | WAL-USDC | PLACE |
5dJ5p8a5FG8DCDo9qCEvCwpLXNzjKYVHzsKuHmkzxJFY |
Oct 30, 2025 21:31:43 | -2,498.105196 | - | xBTC-USDC | PLACE |
DqNzfAeyEtYr7Y3AbboyudBFzWpPVDDUdJq6if6cvyHF |
Oct 30, 2025 21:27:43 | -10,019.999723 | - | NS-USDC | PLACE |
Analyzing the Data
The data reveals a pattern: placing and canceling orders results in a small loss of USDC, indicating a fee is being charged even though the orders were never executed. Let's break down some specific cases.
Confirmed Cases of Fee Losses
Here are five specific examples where fees were incurred on canceled orders:
Case 1: xBTC-USDC (0.0748% loss)
Case 1: xBTC-USDC (0.0748% loss)
- PLACE:
AxNBpirqGkAbgeYRPkqk2pmvKsAEw9XVsvocJsBZ2i4A→ -10,022.004000 USDC - CANCEL:
2kMfBFaZiCKYsQeLGcab1bUJWUtKsHgh3jHoiRRDDn7f→ +10,014.502500 USDC - Loss: 7.501500 USDC (0.0748%)
- Order ID: 922521671144661420389868722210
This case clearly shows a loss of 7.501500 USDC, which translates to 0.0748% of the order value, despite the order never being executed.
Case 2: NS-USDC (0.1372% loss)
Case 2: NS-USDC (0.1372% loss)
- PLACE:
GyJG5F9wkvinrU91HNeDMCpUz22V4Vd9445gBDS27bCb→ -10,007.427740 USDC - CANCEL:
9CD8Up2GEdp29dDCyBovkFa2t2fBy4QFVRqaDDVvfytK→ +9,993.695024 USDC - Loss: 13.732716 USDC (0.1372%)
- Order ID: 276885646993124443453501187
Here, the loss is even more significant at 0.1372%, further highlighting the issue.
Case 3: NS-USDC (0.1217% loss)
Case 3: NS-USDC (0.1217% loss)
- PLACE:
DqNzfAeyEtYr7Y3AbboyudBFzWpPVDDUdJq6if6cvyHF→ -10,019.999723 USDC - CANCEL:
4V6ryGtLbeHvyV13AMHC9dV9PAtYTME28nUU7EQ4N62J→ +10,007.800724 USDC - Loss: 12.198999 USDC (0.1217%)
- Order ID: 276885646993124443453506384
Another clear case of fees being charged on an unexecuted order.
Case 4: xBTC-USDC (0.0751% loss)
Case 4: xBTC-USDC (0.0751% loss)
- PLACE:
5dJ5p8a5FG8DCDo9qCEvCwpLXNzjKYVHzsKuHmkzxJFY→ -2,498.105196 USDC - CANCEL:
HQJRFZ5rvbtppKYZpacHd4Qnq5sw5GptFmWRrUgFSsVS→ +2,496.230109 USDC - Loss: 1.875087 USDC (0.0751%)
- Order ID: 223943473073280700691948735502
Consistent with the first case, xBTC-USDC shows a similar fee percentage.
Case 5: xBTC-USDC (+0.1138% gain - anomaly)
Case 5: xBTC-USDC (+0.1138% gain - anomaly)
- PLACE:
GdewvPDDHPMQAUrwhUA3JpM19of1y1d1QWcRZoZWFUTv→ -2,486.563265 USDC - CANCEL:
u2ypxcAsSvhX4ZbqYnHmaeSWhEHVJeRk4g5gRkisjnf→ +2,489.393798 USDC - Gain: +2.830533 USDC (+0.1138%)
- Order ID: 224312407954754891724268725825
- Note: This case resulted in a net gain. Reason unknown.
This case is interesting because it resulted in a gain. This anomaly suggests there might be other factors at play that we don't fully understand yet. More investigation is needed to explain this outlier.
Case 6 (WAL-USDC)
- PLACE:
3so5nheCyzztrFqWoRMq4K5Cq7nV91FHbP4rdpNfLmpM(Order placed but not yet canceled.)
Summary Statistics
Let's crunch the numbers to get a clearer picture of the overall impact:
- Total losses: 35.308302 USDC (excluding Case 5 anomaly)
- Fee range: 0.0748% - 0.1372%
- Trading pairs affected:
- xBTC-USDC: ~0.075% average (Cases 1, 4)
- NS-USDC: ~0.13% average (Cases 2, 3)
- Observation: NS-USDC fees are approximately 1.73x higher than xBTC-USDC fees. This difference in fee percentages between trading pairs is another important aspect to investigate.
Expected vs Actual Behavior: A Discrepancy
To fully grasp the severity of the issue, let's compare the expected behavior with the actual behavior.
Expected Behavior (per DeepBook V3 docs)
"Fees are charged ONLY upon execution, not upon placement"
For Post Only orders, this means:
- Placement: No trading fees (only gas ~$0.002-0.003)
- Cancellation: No trading fees (only gas)
- No execution = No protocol fees
This is the fundamental principle that's being violated. Traders should not be charged protocol fees for orders that never execute.
Actual Behavior (Observed)
Orders that were:
- ✅ Never matched (Post Only cannot take)
- ✅ Never executed (0% fill confirmed)
- ✅ Canceled by user
Are being charged 0.075%-0.137% fees, which is:
- 25x-45x higher than gas costs
- 3x-5.5x higher than documented max taker fee (0.025%)
These figures are alarming. The observed fees are significantly higher than both gas costs and the maximum taker fee, contradicting the documented fee structure.
Implications and Next Steps
This issue has serious implications for traders using the DeepTrade protocol. The unexpected fees can significantly impact profitability and create a negative trading experience.
Key Takeaways:
- Protocol fees are being incorrectly charged on unexecuted limit orders.
- The fee range is between 0.075% and 0.137%.
- NS-USDC trading pair seems to have higher fees compared to xBTC-USDC.
- The actual behavior contradicts the DeepBook V3 documentation.
Next Steps:
- Further Investigation: DeepTrade developers need to investigate the root cause of this issue. This includes examining the smart contract code and the fee calculation logic.
- Transparency: Open communication with the community is crucial. DeepTrade should provide updates on the investigation and the steps being taken to resolve the issue.
- Fee Reimbursement: Traders who have been affected by these incorrect fees should be reimbursed.
- Documentation Update: If the fee structure has changed, the DeepBook V3 documentation needs to be updated to reflect the current practices.
Conclusion
The discovery of protocol fees being charged on unexecuted limit orders is a significant issue that demands immediate attention. By understanding the problem, analyzing the evidence, and outlining the necessary steps, we can work together to ensure a fair and transparent trading environment on DeepTrade. Let's hope the developers address this quickly and keep the community informed! What are your thoughts on this issue? Share your experiences and insights in the comments below!