Open Arrowana opened 2 years ago
The code mixes up both
https://github.com/project-serum/swap/blob/master/programs/swap/src/lib.rs#L505-L555
When creating an order we need the rebate token account, which gives the rebate on the fees, while settle funds need the referrer to take the UI cut.
New order
https://github.com/project-serum/serum-dex/blob/master/dex/src/state.rs#L1814-L1818
Settle funds
https://github.com/project-serum/serum-dex/blob/master/dex/src/state.rs#L2086
Serum swap is using both as the same thing. anchor CPI is also doing the term "referral" for both situations.
But how to handle both of those as remaining_accounts?
The code mixes up both
https://github.com/project-serum/swap/blob/master/programs/swap/src/lib.rs#L505-L555
When creating an order we need the rebate token account, which gives the rebate on the fees, while settle funds need the referrer to take the UI cut.
New order
https://github.com/project-serum/serum-dex/blob/master/dex/src/state.rs#L1814-L1818
Settle funds
https://github.com/project-serum/serum-dex/blob/master/dex/src/state.rs#L2086
Serum swap is using both as the same thing. anchor CPI is also doing the term "referral" for both situations.
But how to handle both of those as remaining_accounts?