Skip to content

Conversation

@gregorydemay
Copy link
Contributor

@gregorydemay gregorydemay commented Jan 20, 2026

Ensure that DOGE deposits will be ignored when their value is below a configurable minimum amount. This is needed to ensure that the minter does not control UTXOs whose value are below the dust threshold (0.01 DOGE). This was not a problem for ckBTC, which deducts a check_fee on the deposited UTXO value and whose value is above the Bitcoin dust threshold. In contrast, ckDOGE does not deduct a checker fee (check_fee is 0), but still requires deposited UTXOs to have sufficient value.

For that reason, the following changes were made to the ckBTC and ckDOGE minter:

  1. Introduction of a new parameter deposit_btc_min_amount, which controls the minimum value a deposited UTXO must have to avoid being ignored.
  2. The required minimum value of a deposited UTXO (which depends on the 2 parameters check_fee and deposit_btc_min_amount) is returned as part of the MinterInfo and displayed on the minter dashboard.

About CI_OVERRIDE_DIDC_CHECK: the following non-breaking changes were made to the Candid interface:

  1. ckbtc_minter.did
    1. Adding a new optional field in InitArgs and UpgradeArgs
    2. Adding a new optional field in MinterInfo
  2. ckdoge_minter.did: the ckDOGE minter is not yet live, so that any change here is by definition not breaking.

@github-actions github-actions bot added the fix label Jan 20, 2026
@gregorydemay gregorydemay added the CI_OVERRIDE_DIDC_CHECK Skips the backwards compatibility didc check (explain in PR description why) label Jan 20, 2026
@gregorydemay gregorydemay changed the title fix(ckdoge): reject deposits below dust limit fix(ckdoge): reject deposits below minimum amount Jan 21, 2026
@gregorydemay gregorydemay marked this pull request as ready for review January 21, 2026 08:22
@gregorydemay gregorydemay requested a review from a team as a code owner January 21, 2026 08:22
@github-actions github-actions bot added the @defi label Jan 21, 2026

for utxo in processable_utxos {
if utxo.value <= check_fee {
let ignored_reason = if utxo.value < deposit_btc_min_amount {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: One would expect that a deposit of exactly deposit_btc_min_amount is permissible because the name suggests that it is the minimum accepted value.

ecdsa_key_name : text;

// The minimal amount of BTC that can be converted to ckBTC.
deposit_btc_min_amount : opt nat64;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the advantage of having a concrete parameter?
Why not simply have effective_deposit_min_btc_amount return max(MINTER_ADDRESS_P2WPKH_DUST_LIMIT, check_fee+1)?

ecdsa_key_name : text;

// The minimal amount of DOGE that can be converted to ckDOGE.
deposit_doge_min_amount : opt nat64;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same question here: Is there a good reason to have this as a parameter?

Copy link
Member

@ninegua ninegua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI_OVERRIDE_DIDC_CHECK Skips the backwards compatibility didc check (explain in PR description why) @defi fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants