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

IBC Hooks: add hooks to call bridge escrow program #403

Merged
merged 11 commits into from
Nov 1, 2024

Conversation

dhruvja
Copy link
Collaborator

@dhruvja dhruvja commented Oct 24, 2024

A message is sent through IBC to unlock the funds of the solver. To achieve this, the solana-ibc program needs to forward the memo to the bridge-escrow program so that it can release the funds to the solver. Since anybody can send memo, we execute the hook only if the transferred token is the token owned by the bridge-escrow on the counterparty chain (ethereum). This allows us to verify that the message to unlock the funds originated from the right contract and it is not spoofed.

solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs Outdated Show resolved Hide resolved
solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs Outdated Show resolved Hide resolved
solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs Outdated Show resolved Hide resolved
solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs Outdated Show resolved Hide resolved
solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs Outdated Show resolved Hide resolved
solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs Outdated Show resolved Hide resolved
solana/solana-ibc/programs/solana-ibc/src/lib.rs Outdated Show resolved Hide resolved
solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs Outdated Show resolved Hide resolved
@dhruvja dhruvja merged commit 64d90cd into master Nov 1, 2024
4 checks passed
@dhruvja dhruvja deleted the bridge-escrow-hooks branch November 1, 2024 16:47
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