Overlay fee
What's overlay fee?
Users can now add an additional fee (Overlay Fee) on top of cetus aggregator. This fee is distinct from the existing Partner Swap Fee. Below are the key differences between Overlay Fee and Partner Fee:
Scope of Application:
Partner Fee: Can only be collected within Cetus pools.
Overlay Fee: Applicable across all types of transaction paths.
Fee Collection Mechanism:
Partner Fee: Temporarily stored within the contract and must be claimed using a Partner Cap.
Overlay Fee: Directly transferred to the designated Overlay Fee Receiver specified during SDK initialization, upon every transaction.
Maximum Threshold:
The current maximum threshold configurable for the Overlay Fee is 1%.
Slippage Calculation and Overlay Fee:
Overlay Fee is incorporated directly into the initial pre-calculation step for slippage evaluation. For example, when swapping 1 USDC to USDC, if the Overlay Fee is 0%, the pre-calculated output (
amount out
) will be 1,000,000. However, if the Overlay Fee is set to 0.5%, the pre-calculatedamount out
will display as 995,000, clearly indicating an Overlay Fee of 5,000.
How to set overlay fee and receiver?
Last updated