Skip to content

Audit Issue 5: Use reward address (if set) for reward allocation in the Outbound Queue v2#20

Merged
claravanstaden merged 4 commits intoclaravanstaden:snowbridge-v2-audit-fixesfrom
yrong:ron/snowbridge-v2-audit-fixes
Apr 17, 2025
Merged

Audit Issue 5: Use reward address (if set) for reward allocation in the Outbound Queue v2#20
claravanstaden merged 4 commits intoclaravanstaden:snowbridge-v2-audit-fixesfrom
yrong:ron/snowbridge-v2-audit-fixes

Conversation

@yrong
Copy link
Copy Markdown

@yrong yrong commented Apr 9, 2025

No description provided.

@yrong yrong changed the title Credit to reward address Audit Issue 5: Use reward address (if set) for reward allocation in the Outbound Queue v2 Apr 9, 2025
Comment thread bridges/snowbridge/pallets/outbound-queue-v2/src/lib.rs Outdated
@github-actions github-actions Bot requested a review from acatangiu April 16, 2025 09:15
@github-actions
Copy link
Copy Markdown

Review required! Latest push from author must always be reviewed

@claravanstaden claravanstaden requested a review from vgeddes April 16, 2025 09:17
// Verify that the message was submitted from the known Gateway contract
ensure!(T::GatewayAddress::get() == receipt.gateway, Error::<T>::InvalidGateway);

let reward_account: T::AccountId = receipt.reward_address.into();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

As a fallback, if receipt.reward_address is zero bytes, we should rather reward the relayer.

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

one comment here: 121341a#comments

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Comment link: 121341a#r155493682

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.

@claravanstaden claravanstaden requested a review from vgeddes April 16, 2025 16:38
@yrong yrong requested a review from claravanstaden April 17, 2025 08:42
@claravanstaden claravanstaden merged commit 8f9d985 into claravanstaden:snowbridge-v2-audit-fixes Apr 17, 2025
95 of 189 checks passed
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.

4 participants