-
Notifications
You must be signed in to change notification settings - Fork 4
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
Merchant specific BTC Fee Rates #136
base: dev
Are you sure you want to change the base?
Conversation
contracts/DLCManager.sol
Outdated
if (mintFeeRate == 0 && mintFeeRate != btcMintFeeRate) { | ||
mintFeeRate = btcMintFeeRate; | ||
} | ||
if (redeemFeeRate == 0 && redeemFeeRate != btcRedeemFeeRate) { | ||
redeemFeeRate = btcRedeemFeeRate; | ||
} |
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.
This check is like this because the default value of a mapping is 0. And 0 is a perfectly valid value to set a custom fee rate at. So we check if it has been changed at all.
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.
Makes sense that you want to handle the initial case of a 0, but i'm not sure this is the right way.
What if we roll this out, then we want to set a merchants fee rate to 0, wouldn't this still then force it to be the global value?
contracts/DLCManager.sol
Outdated
if (mintFeeRate == 0 && mintFeeRate != btcMintFeeRate) { | ||
mintFeeRate = btcMintFeeRate; | ||
} | ||
if (redeemFeeRate == 0 && redeemFeeRate != btcRedeemFeeRate) { | ||
redeemFeeRate = btcRedeemFeeRate; | ||
} |
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.
Makes sense that you want to handle the initial case of a 0, but i'm not sure this is the right way.
What if we roll this out, then we want to set a merchants fee rate to 0, wouldn't this still then force it to be the global value?
Adds support for setting custom fee rates for a single address.
If there is nothing set, it uses the default global fee rates.