partnerFeeBps field with a buy or a sell. The fee is paid to a wallet you register with Trench, as a plain SOL transfer included in the same transaction as the trade.
Because the transfer rides in the trade transaction, the two settle together. A trade that fails moves no fee.
Charging a fee requires the Partner tier. Apps on the free Basic tier cannot charge one, and a non-zero
partnerFeeBps from such an app is rejected outright. See Tiers.Setting the Rate
The rate is expressed in basis points, so100 is 1% and 50 is 0.5%. It is sent per request, and Trench never stores it.
Omitting the field, or sending
0, charges nothing. Trench never applies a rate you did not send.
The upper bound of 9999 is arithmetic rather than a policy ceiling, since a rate of 10000 basis points would leave nothing to spend on the trade.
What the Fee Is Charged On
The basis differs between buys and sells, and rounding is always down so you never over-collect.Fees and Slippage
On a buy, the fee is deducted before the remainder reaches the trading venue. In slippage mode this is handled for you. Trench takes the quote after deducting the fee, so the derived bound already accounts for it. If you charge a fee, this is the main practical reason to prefer that mode. In explicit mode the deduction is yours to account for, which meansminTokensOut has to be quoted against the post-fee amount rather than against maxSolIn.
Registering Fee Wallets
Fee wallets are granted with the Partner tier. Send the Trench team one or more addresses to register against your app, each of which has to meet three conditions.- It must already exist on-chain.
- It must be a plain system account rather than a program-owned one.
- It must already be rent-exempt.
partnerFeeBps without an eligible tier or a registered wallet returns partner_fee_not_configured. The message field distinguishes the two cases.
Disclosure
Trench imposes no ceiling onpartnerFeeBps and does not tell your users what you charge. The consent screen indicates only that your app charges a fee, not the rate.