Replies: 17 comments 30 replies
-
Thanks for submitting this - reviewing! |
Beta Was this translation helpful? Give feedback.
-
Thanks @brendonv Providing some raw thoughts and suggestions below to assist. |
Beta Was this translation helpful? Give feedback.
-
I think |
Beta Was this translation helpful? Give feedback.
-
You may want a boolean flag on transaction similar to is_approval on HBAR transfers except it needs to be applicable to all transactions to ensure applicability. |
Beta Was this translation helpful? Give feedback.
-
No worries about this as it's more an implementation detail for each SDK language. Rather you'd want to specify any protobuf changes and suggest that the SDK would expose the new properties. message TransactionBody {
...
/**
* The account a spender is noting has provided prior willingness through an HBAR allowance to sponsor transaction fees
*/
AccountID fee_sponsor_account_id = 53;
} This would allow nodes to quickly verify the validity of an allowance claim and if sufficient balance exists. |
Beta Was this translation helpful? Give feedback.
-
@brendonv one way to increase the understanding of the proposal is to add a few user flow examples with specific transactions and uses cases to drive the point home. |
Beta Was this translation helpful? Give feedback.
-
@nodlRob as discussed tagging @gregscullard |
Beta Was this translation helpful? Give feedback.
-
I recently posted this code snippet that shows a potential flow using our existing capabilities. As mentioned in this proposal this flow suffers from the issue that the Payer needs to sign every transaction and there needs to be infrastructure for the owner to pass the frozen transaction to the payer, and then after the payer or the owner will need to submit the transaction in <3min. |
Beta Was this translation helpful? Give feedback.
-
I like this proposal - but I would like to talk through the deltas between the current approveHbarAllowance functionality and the above proposal. The above proposal designates a payer account. Under this arrangement potentially all the HBAR in the payer account could be consumed by the owner. This is why the proposal also needs the ability to revoke that permission. Alternatively the current Allowance functionality permits a certain # of HBAR to be spent by the owner - with no ability to revoke that permission. It would be good to understand the pros and cons of both approaches to see what is preferred. I think the above question should be brought into the use case of a "crypto intermediary". You have a company Acme which is providing crypto intermediary services to their customers A, B, C. So owners A,B,C perform a range of Hedera transactions which Acme pays for though the payer accounts. So to me the question is how Acme "recharges" those payer accounts and manages the lifecycle. Proposal 1:
Proposal 2:
Thoughts and feedback appreciated. |
Beta Was this translation helpful? Give feedback.
-
@Reccetech thanks very much for your input here - much appreciated! The main difference between the current approveHbarAllowance functionality and the above proposal is effectively a narrowing of the allowance to cover ONLY the payment of fees of a 'spender' account, and not transfers. Perhaps the option that would give the most flexibility would give the ability to revoke the permission AND set a spend allowance. This would make the setup in both proposal 1 and proposal 2 feasible. Even if you only intended to use the account method in proposal one, you could set a VERY high limit making it operate in a similar way. Yes any updates to the permission should supersede the old one. Having an allowance would also give the added benefit of granting multiple allowances from a single account (rather that creating new accounts for each individual user for ACME). Some users might have a preference for the transaction payments to be pooled with other users and not be separately identifiable from a single account. I think not being being able to revoke the permission would be commercially unviable for ACME. Practically there could be a range of reason why that could be necessary. |
Beta Was this translation helpful? Give feedback.
-
Regarding above. The question in my mind is how would you monitor that the balance of the allowance for a given customer in the above scenario? |
Beta Was this translation helpful? Give feedback.
-
This is a very cool idea @brendonv! It could help reduce onboarding friction for big use cases. That diagram is a great breakdown of how this could be used. My biggest question for feasibility is:
Do we have a mechanism where it's free for a account to sign the transaction allowing this fee transfer? I know in @Reccetech example the transaction was frozen then returned. Is this a new method or already supported method of transaction passing that we would automate on the network level for this feature? |
Beta Was this translation helpful? Give feedback.
-
This should also support queries, not just transactions ? |
Beta Was this translation helpful? Give feedback.
-
Placeholder for discussion, what does the TransactionId become, historically, the accountId in the TransactionId is the payer for the transaction. If a transaction's fee is sponsored by another account, does the TransactionId need to specify that accountId, or remain the same (the account that submitted the transaction)
|
Beta Was this translation helpful? Give feedback.
-
I also like the ability to have an unlimited allowance, I can manage the actual allowance by managing the balance of the account being allowed, I don't need to both keep a balance in the account and repeatedly update allowances |
Beta Was this translation helpful? Give feedback.
-
You could just allow piggy-back transfer of funds (payments) for any transaction and utilize the existing allowances mechanism already in place. I believe the protocol already supports this for Queries due to the way query payments are structured presently. |
Beta Was this translation helpful? Give feedback.
-
Hi All, I'll be jumping into a few of the threads here to support this HIP from an AP+ perspective, so apologies in advance for multiple notifications! 😄 |
Beta Was this translation helpful? Give feedback.
-
Abstract:
This proposal extends the existing Approval and Allowance API. It creates a new Allowance that enables Hedera accounts to delegate the payment of transaction fees to another account without requiring one off approval for each transaction. This feature enhances flexibility and efficiency in managing transaction costs, particularly for high volume applications.
Motivation:
The current Hedera ecosystem lacks a native capability for an Owner account to cover transaction fees of a Spender without co-signing for every transaction. This limitation hinders the development of user-friendly applications and services that could benefit from a more flexible transaction fee structure.
User Stories:
As an enterprise user of Hedera, I want the ability to have transaction fees covered by an external account provider so that I don’t have to buy, hold and maintain HBAR balances.
E.g a high volume use case could outsource the management of their account to a separate provider. The separate provider could regularly bill the use case say $1k USD and the provider is then responsible for monitoring, acquiring and delivery HBAR that they need. The the use case can then run their application as per normal, but have the fees debited from the provider.
Specification:
Allowance Mechanism would simply be an extension of the existing API whereby Owner accounts can grant an allowance for Spender accounts. When the Spender incurs network transaction fees, it is debited from the HBAR balance of the Owner.
message PayerAllowance {
AccountID owner = 1;
AccountID spender = 2;
int64 amount = 3;
}
Operation ID & Keys: As part of the basic environment setup, alongside Operator ID & Private keys, introduce an additional configuration for PayMasterID, representing the public account number of the Owner. This would simplify the development environment setup for dApps who plans on using another account to pay for the transaction fees.
If the Spender sets the PayMasterID, and that Owner account has not granted an Allowance to the Spender, the transaction will fail.
If the Spender sets the PayMasterID, and that Owner account has granted an Allowance to the Spender but does not hold sufficient HBAR to pay for the transaction, the transaction will fail.
TODO/assistance needed pseudocode example using Hedera SDK which demonstrates flows described in “Operation ID & Keys”
Permission and Revocation: The Owner account can grant and revoke access to the Spender account at any time, ensuring control over who can debit fees from their account.
Allowance setting: If permission is granted, the Owner’s account will be debited for each transaction initiated by the Spender, facilitating seamless transactions. The allowance limit is also debited as the Spender uses it. Once the Spender has fully depleted the allowance, transactions will fail.
Rationale: Implementing this feature would significantly lower the barrier for new users and developers by simplifying the fee management process. It opens new avenues for dApp developers to abstract transaction fees for their users, fostering a more accessible and user-friendly ecosystem.
Backwards Compatibility: This proposal is designed to be an extension of the existing Hedera services and protocols, ensuring compatibility with current infrastructure while expanding functionality.
Conclusion: By allowing accounts to delegate the payment of transaction fees, Hedera can unlock new potential in dApp development and user engagement, making the network more accessible and efficient for all stakeholders.
This is a draft and needs further technical support and community feedback
Beta Was this translation helpful? Give feedback.
All reactions