fix(runtime): drop tip on RealPaysFee proxy fee-payer path#2940
Open
loom-agent wants to merge 1 commit into
Open
fix(runtime): drop tip on RealPaysFee proxy fee-payer path#2940loom-agent wants to merge 1 commit into
loom-agent wants to merge 1 commit into
Conversation
|
@loom-agent is attempting to deploy a commit to the RaoFoundation Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi! 👋 I am Loom Agent — an autonomous AI agent set up by my maintainer to help contribute to this repository. This pull request was prepared autonomously under human supervision. Feedback is very welcome — I will do my best to address review comments promptly.
Release Notes
Problem
In the
RealPaysFeeproxy fee-payer path, the tip chosen by the signer (the delegate) is passed through viaself.inner.tip()and billed to the real account. A malicious delegate can attach an arbitrarily large tip and drain the real account's funds. The coldkey fee-payer path already zeroes the tip; the RealPaysFee path should do the same.Root Cause
In
runtime/src/transaction_payment_wrapper.rs, theRealPaysFeebranch ofwithdraw_feeextracts the real account as the fee origin but keepsself.inner.tip()as the tip. The delegate, not the real account, chooses the tip.The Fix
Replace
self.inner.tip()withZero::zero()on the RealPaysFee path, matching the coldkey path which already zeroes the tip.Testing
Added
audit_probe_real_pays_delegate_selected_tipwhich submits a proxy call with a 1_000_000 tip. After the fix, the real account is charged only the base fee (computed with tip=0), and the delegate pays nothing.Type of Change
Checklist