Skip to content
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

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open

Conversation

scolear
Copy link
Contributor

@scolear scolear commented Feb 11, 2025

Adds support for setting custom fee rates for a single address.

If there is nothing set, it uses the default global fee rates.

Comment on lines 607 to 612
if (mintFeeRate == 0 && mintFeeRate != btcMintFeeRate) {
mintFeeRate = btcMintFeeRate;
}
if (redeemFeeRate == 0 && redeemFeeRate != btcRedeemFeeRate) {
redeemFeeRate = btcRedeemFeeRate;
}
Copy link
Contributor Author

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.

Copy link
Contributor

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?

Comment on lines 607 to 612
if (mintFeeRate == 0 && mintFeeRate != btcMintFeeRate) {
mintFeeRate = btcMintFeeRate;
}
if (redeemFeeRate == 0 && redeemFeeRate != btcRedeemFeeRate) {
redeemFeeRate = btcRedeemFeeRate;
}
Copy link
Contributor

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 Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants