Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify order book fee: Research fee charging in regards to our market creator fees on the Polymarket protocol. #1249

Open
Chralt98 opened this issue Jan 25, 2024 · 1 comment
Labels
l:S Solving this issue takes hours p:high High priority, prioritize the resolution of this issue

Comments

@Chralt98
Copy link
Member

Because our fee taking for the order book is pretty hard to explain, we should figure out how other protocols in particular Polymarket deals the fees.

In that way we would have clear information on the front end to explain to the user, who pays what amount.

Keep in mind that we shouldn't charge fees in the outcome asset and see this as a requirement for the solution.

@Chralt98 Chralt98 added p:high High priority, prioritize the resolution of this issue l:S Solving this issue takes hours labels Jan 25, 2024
@Chralt98 Chralt98 changed the title Research fee charging in regards to our market creator fees on the Polymarket protocol. Simplify order book fee: Research fee charging in regards to our market creator fees on the Polymarket protocol. Jan 25, 2024
@Chralt98
Copy link
Member Author

Chralt98 commented Mar 15, 2024

https://docs.polymarket.com/#fees or here for Github README.

Fees are levied in the output asset (proceeds).

If buying (ie receiving A or A'), the fee is levied on the proceed tokens. If selling (ie receiving C), the fee is levied on the proceed collateral.

So, as far as I understand here, the fees are always taken from the proceed tokens. If I interpret it correctly, the fees are either taken for a sell from the base asset or for a buy from the outcome asset. So proceed tokens means what asset the trader is getting.

This allows to charge equivalent fees on maker and taker site like here.

Now the question arises, if we want to proceed with that approach. It would mean that fees in outcome asset would be received by the external source (in our case the market makers). But there was a reason why we decided to charge fees in the markets base asset. And this reason was that outcome assets are temporary, while the base asset is probably more sustainable in live time.

It could also be done in many different ways. For example: The taker and maker each have to provide their market's base asset fee portion. However this would require both parties to have the base asset of the market.
Another approach is to exchange the outcome tokens internally to the markets base asset on the AMM and then follow the approach above.

I don't think giving the external fee receiver outcome tokens is a good idea. On their side, the best is still the market's base asset.

We could also go with what we have right now and abstracting it to the front end by adding a proportional amount in outcome asset on top of each order in the book and declare it as the fee on the front end order.

Additionally it's possible to give out less outcome tokens (or even burn fees from the outcome tokens) so that fees are charged proportionally fair on both ends, the base asset and the outcome asset. This route was taken by me as I developed the order book first. However this led to the behavior that a trader, who sells outcome tokens for base asset specifies a greater amount to sell than which is actually charged. This can be mitigated by the burn approach mentioned before. So, the trader puts in a specified amount_in for selling outcome tokens, then a fee is charged, which burns the outcome token proportional to the base asset fees.

In a typical order book exchange, whether the maker (the person placing the order that adds liquidity to the market) or the taker (the person filling the order and taking the liquidity) pays the fee can vary by exchange. Some exchanges charge the fee in the asset being sold, while others may charge it in the asset being bought, or even in the exchange's own token. Often, takers are charged a fee because they are removing liquidity from the market, while makers might be offered lower fees or even rebates for adding liquidity. The specific details, including in which currency the fees are paid, depend on the exchange's policies.

ChatGPT (^TM)

So, we will probably also define it ourselves.

Useful resource: https://www.investopedia.com/articles/active-trading/042414/what-makertaker-fees-mean-you.asp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l:S Solving this issue takes hours p:high High priority, prioritize the resolution of this issue
Projects
None yet
Development

No branches or pull requests

1 participant