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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

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
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