We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I found a party that is quite a big player on testnet so has a rebate
query volumeRebateStats { volumeRebateStats(partyId:"00b07e02bd56f84f3fcef3635f6a6a1d1cadd66665dbf7f12090e8787ef26571",epoch:532){ edges{ node{ atEpoch partyId additionalMakerRebate makerVolumeFraction makerFeeReceived } } }
Then I queried its partyDiscountStats
query partyDiscountStats { partyDiscountStats(partyId:"00b07e02bd56f84f3fcef3635f6a6a1d1cadd66665dbf7f12090e8787ef26571"){ volumeDiscountTier volumeRebateTier referralDiscountTier partyMarketFees{ marketId undiscountedTakerFee discountedTakerFee baseMakerFee userMakerRebate } } }
The rebate looks good ... you can see the jump from 0.0002 to 0.0007 which is the expected 0.0005 jump.
BUT .... what in gods name is going on with discounted taker fee!?
{ "data": { "partyDiscountStats": { "volumeDiscountTier": 3, "volumeRebateTier": 2, "referralDiscountTier": 0, "partyMarketFees": [ { "marketId": "07d83b233cc0c43b8e46b5384bbbb52bd23d27502c20ba180cfb9c690e0ba6be", "undiscountedTakerFee": "0.00071", "discountedTakerFee": "-0.09229", "baseMakerFee": "0.0002", "userMakerRebate": "0.0007" }, { "marketId": "0cb6c0893348878cb1d1db0400d094325d6ca7f82fa7ebe7d38fdb3e4a0a1706", "undiscountedTakerFee": "0.00071", "discountedTakerFee": "-0.09229", "baseMakerFee": "0.0002", "userMakerRebate": "0.0007" }, { "marketId": "90360cb6312346f8a5380cc7d6a7df30583135e743246d68ffd1a51effe7394e", "undiscountedTakerFee": "0.00071", "discountedTakerFee": "-0.09229", "baseMakerFee": "0.0002", "userMakerRebate": "0.0007" } ] } } }
Code looks wrong
// undiscounted base := num.DecimalZero().Add(maker).Add(infra).Add(liquidity)
So its missing buyback and treasury components on the undiscounted
And you cant simply subtract discount factors here....are discounting a proportion of the fees, not directly reducing the free
discounted := num.DecimalZero().Add(maker.Sub(factors.maker)). Add(infra.Sub(factors.infra)). Add(liquidity.Sub(factors.liquidity))
Also userMakerRebate needs to reflect the possibility that it is being capped by the treasury plus buyback.
userMakerRebate
ie. userMakerRebate = MAX(userMakerRebate, treasuryFee+buybackFee)
Ideally you would include BOTH the theoretical userMakerRebate from the program AND the actual so that we can tell if it has been capped.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
I found a party that is quite a big player on testnet so has a rebate
Then I queried its partyDiscountStats
The rebate looks good ... you can see the jump from 0.0002 to 0.0007 which is the expected 0.0005 jump.
BUT .... what in gods name is going on with discounted taker fee!?
Code looks wrong
// undiscounted
base := num.DecimalZero().Add(maker).Add(infra).Add(liquidity)
So its missing buyback and treasury components on the undiscounted
And you cant simply subtract discount factors here....are discounting a proportion of the fees, not directly reducing the free
Also
userMakerRebate
needs to reflect the possibility that it is being capped by the treasury plus buyback.ie. userMakerRebate = MAX(userMakerRebate, treasuryFee+buybackFee)
Ideally you would include BOTH the theoretical userMakerRebate from the program AND the actual so that we can tell if it has been capped.
The text was updated successfully, but these errors were encountered: