Skip to content

feat(refund): support Zcash refunds (shielded/Orchard + transparent)#51

Merged
olga24912 merged 17 commits into
omni-mainfrom
zcash-refund
Jun 12, 2026
Merged

feat(refund): support Zcash refunds (shielded/Orchard + transparent)#51
olga24912 merged 17 commits into
omni-mainfrom
zcash-refund

Conversation

@olga24912

@olga24912 olga24912 commented May 27, 2026

Copy link
Copy Markdown

Summary

Extends the refund flow — previously Bitcoin-only — to Zcash. A deposit that was
never finalized via verify_deposit/safe_verify_deposit can now be returned to
the user on Zcash, with the shielded (Orchard → unified address) path as the
primary case and a transparent (t-address) path as a fallback.

@olga24912 olga24912 changed the title Refund for ZCash feat(refund): support Zcash refunds (shielded/Orchard + transparent) May 27, 2026
@olga24912 olga24912 marked this pull request as ready for review May 27, 2026 17:34
Comment thread contracts/satoshi-bridge/src/bitcoin_utils/refund.rs Outdated
Comment thread contracts/satoshi-bridge/src/refund.rs Outdated
Comment thread contracts/satoshi-bridge/src/legacy.rs
Comment thread contracts/satoshi-bridge/src/zcash_utils/refund.rs Outdated
Comment thread contracts/satoshi-bridge/src/zcash_utils/refund.rs Outdated
Comment thread contracts/satoshi-bridge/src/api/bridge.rs Outdated
@olga24912 olga24912 merged commit c8093b9 into omni-main Jun 12, 2026
1 check passed
pub(crate) const GAS_FOR_EXECUTE_REFUND_CALLBACK: Gas = Gas::from_tgas(60);

/// Refund transactions never expire (`expiry_height = 0`).
pub(crate) const REFUND_EXPIRY_HEIGHT: u32 = 0;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's verify if the 0 is still valid for the Zcash protocol

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

From what I've quickly looked at, everything's fine and there are no problems with this. But I think it'll be easier to make test transactions and find out for sure that way.

output,
orchard_bundle,
expiry_height,
last_block_height,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The last_block_height could be out dated in case if the light client is out of sync, or during the Zcash protocol upgrade, this will produce invalid tx. we have to make sure that the refund tx can be recreated if needed.

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.

3 participants