-
Notifications
You must be signed in to change notification settings - Fork 47
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
feat: configurable referral values #767
base: master
Are you sure you want to change the base?
Conversation
}; | ||
|
||
// TODO: direction of chain swaps | ||
type Premiums = Partial<Record<SwapType, number>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we should go for a seperate Premium
type to accomodate chain swaps and to be more flexible in the future.
type Premium = {
swapType: SwapType
pair: Pair
serviceFee: number
}
And use a Premium[]
in the config instead of a Record
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would just turn the Records into lists. What is the advantage of that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. With the records, we can only have one per swap type.
With this, we could have 2 entries for chain swaps since we also have the pair information, so you could change BTC->LBTC without affecting LBTC-BTC - same for reverse / submarine swaps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Pair configs beat the ones of the type
pairs?: Record<string, ReferralPairConfig>;
There is a nested mapping for pair -> type -> values already.
so you could change BTC->LBTC without affecting LBTC-BTC
That is not the case either way. Those two directions are the same pair internally
Does this address all points of #754 including limiting concurrent swaps yet? |
Everything excluding concurrent limits. |
concept ack |
c613628
to
766417a
Compare
} else { | ||
req.setConfig(argv.config); | ||
} | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the double else?
utACK |
Closes #754
Closes #768