You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
referee taker fee discount showing on trade when referrer has no stake
If a referrer removes sufficient stake to not meet the required tokens, the referral set should not be eligible for the following referral benefits:
- the referrer should not be rewarded for any referee taker fees (0083-RFPR-018).
- all referees should not receive any discount on their taker fees (0083-RFPR-019).
Observed behaviour
taker fee discount showing on BUS_EVENT_TYPE_TRADE
but the discount factor will only be updated for the following epoch - i.e. if some party withdraws their stake during an epoch, they will still be eligible for the discount until the epoch ends. This could be changed is required cc @cdummett
referral set created with referrer(with stake) and referee
referral program is created
remove stake from referrer
wait an epoch
check referrer has no stake
trade1 - referee is taker
wait an epoch
trade2 again - referee is taker
wait for epoch <- added this so I can check ledger for referrer rewards (there is none as expected)
check trade2 for taker fees <- the test fails here because it expects no taker fee discount here
Problem encountered
referee taker fee discount showing on trade when referrer has no stake
Observed behaviour
taker fee discount showing on
BUS_EVENT_TYPE_TRADE
{"id":"331-19","block":"F99A9664639E9818AD68F816805485F5D1CD6F603F52BF3AB936CF64186FB354","type":"BUS_EVENT_TYPE_TRADE","trade":{"id":"e4b28f5ecb65cac7b09a38be1d29bd32a66fd7411516aa3f047ac6ecfebcaed4","marketId":"bcd520534a681052235c1dd44c2d266a70accf4a8b680e753e8d1ac5dd3e25c6","price":"100000000","size":"5000000","buyer":"14cfcc3571fa6425f4dc0b6112595d6e6f13cd390c7028c9799eaa9c805368e1","seller":"a8fe5ebc9d8aa68de87e37bac20f38d85297de1ab421456fcd35727ad0c1dcc6","aggressor":"SIDE_SELL","buyOrder":"1c467375309cd6080aef927cb80878bba1cf6f2ffa08b31ce34b331de1753d03","sellOrder":"41162b6f29c5dbde7ffe0d81f6e68bf1f673f70111d6ed7c678a5778578e291f","timestamp":"1697192450878512569","type":"TYPE_DEFAULT","buyerFee":{"makerFee":"0","infrastructureFee":"0","liquidityFee":"0","makerFeeVolumeDiscount":"0","infrastructureFeeVolumeDiscount":"0","liquidityFeeVolumeDiscount":"0","makerFeeReferrerDiscount":"0","infrastructureFeeReferrerDiscount":"0","liquidityFeeReferrerDiscount":"0"},"sellerFee":{"makerFee":"199600000000000000000","infrastructureFee":"49900000000000000000","liquidityFee":"14970000000000000000000","makerFeeVolumeDiscount":"0","infrastructureFeeVolumeDiscount":"0","liquidityFeeVolumeDiscount":"0","makerFeeReferrerDiscount":"400000000000000000","infrastructureFeeReferrerDiscount":"100000000000000000","liquidityFeeReferrerDiscount":"30000000000000000000"}},"version":1,"chainId":"testnet-001","txHash":"9A0736165C01FBF8E6FDC911D887EC64977FAE7EC537B5779CF918AE15D22369"}
Expected behaviour
i would expect the
BUS_EVENT_TYPE_TRADE
to show taker fee discounts of 0Steps to reproduce
1. run system-test `test_referral_set_referrer_bug`
Software version
dev branch
Failing test
test_referral_set_referrer_bug
Jenkins run
https://jenkins.vega.rocks/job/common/job/system-tests-wrapper/23171/
Configuration used
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: