feat(near): fin transfer without proof as dao - #634
Conversation
| &self, | ||
| #[serializer(borsh)] init_transfer: InitTransferMessage, | ||
| ) -> ProverResult { | ||
| ProverResult::InitTransfer(init_transfer) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 existingfin_transfer_callbackflow. - 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.
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)