Skip to content

feat(near): fin transfer without proof as dao - #634

Draft
frolvanya wants to merge 2 commits into
mainfrom
feat/fin-transfer-as-dao
Draft

feat(near): fin transfer without proof as dao#634
frolvanya wants to merge 2 commits into
mainfrom
feat/fin-transfer-as-dao

Conversation

@frolvanya

Copy link
Copy Markdown
Contributor

Added an option to finalize a transfer by DAO authority, without proof verification. Can be used as an escape hatch for when proof infrastructure (MPC/Wormhole) cannot attest a genuinely valid transfer (e.g recently wormhole had an issue with fogo and guardians didn't produce a VAA for https://wormholescan.io/#/tx/4h8HFuMQfUSopzgMRCNxULFp1P3oB5AfGXdGRTvC8oB4U2PanWPyK55FLPNfirM8tsLSfYh7Vn97mrjT2nG2yYpL and other transfers)

&self,
#[serializer(borsh)] init_transfer: InitTransferMessage,
) -> ProverResult {
ProverResult::InitTransfer(init_transfer)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is a strange workaround, but I couldn't think of other way to easily reuse fin_transfer_callback without modifying the logic inside this method

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a DAO-authorized “escape hatch” path to finalize incoming transfers on the NEAR bridge without proof verification, intended for incidents where the proof pipeline cannot attest a legitimately valid transfer. This is supported by a new contract entrypoint plus an accompanying test suite that exercises success, rejection, and replay/interaction scenarios.

Changes:

  • Add fin_transfer_as_dao() to finalize a transfer using DAO authority (no proof verification), reusing the existing fin_transfer_callback flow.
  • Add comprehensive NEAR workspace tests covering DAO success, permission checks, mismatches/unknown emitters, and replay ordering with proof/fast transfer.
  • Document the new entrypoint in near/CLAUDE.md.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
near/omni-bridge/src/lib.rs Adds fin_transfer_as_dao() and a private helper to feed InitTransferMessage into the existing callback pipeline.
near/omni-tests/src/lib.rs Registers the new DAO finalization test module.
near/omni-tests/src/dao_fin_transfer.rs New test suite validating DAO-based finalization behavior and edge cases.
near/CLAUDE.md Documents the new DAO-only escape hatch finalization method.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread near/omni-bridge/src/lib.rs
@frolvanya
frolvanya marked this pull request as ready for review July 11, 2026 13:57
@karim-en
karim-en marked this pull request as draft July 30, 2026 00:35
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