-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Draft Proposal for Limit on bandwidth spend within Permission Model / for Resource Delegation/Reclaim transactions #6137
Comments
@corytam |
@lxcmyf Oh let me clarify after having a better understanding now with permissions which technically is multisig. For option 1 , I assume the "tenant"/delegatee/tx caller is signing a transaction since the resource and tron belongs to the account (Account A), the account still pays the bandwidth and not the delegatee(Account B) (and Account B is delegating resource to Account C which gets the resources) In this case i meant delegator and delegatee refers to permissions. Maybe I should be saying Owner and permission holder ? Interestingly , the tx caller (Account B) should be the one signing the transaction to (delegate to account C) , I assume it is treated like Account B is signing a transaction on behalf of Account A and hence Account A has to pay for the bandwidth. This would seem like option 1 is not feasible UNLESS a similar option /permission is given where when given , permission (Account B) will sponsor/ pay bandwidth on behalf of the owner ( Account A.) P.S |
@corytam |
@corytam |
Background
I was trying to understand about energy rental and the permission model , and thought that as a seller of energy , the permission model could be improved to enhance security of user's accounts when delegating resources to external accounts.
Simply , a feature within the permission model to prevent spending beyond available bandwidth/energy natively.
I see that some energy platforms give energy sellers an option to set a minimum energy/bandwidth limit to maintain and if this was native , it would be a great feature.
Rationale
I understand for multisig accounts , this issue can be avoided since all/enough parties (with the appropriate weightage) need to sign and approve transactions.
But in pursuit of efficiency and a solution for a non-multisig solution (in regards to energy selling/ resource delegation) which is more easily automated/executed due to simplicity , I believe these features will not only make delegation of resources fully trustless , but simplify and enhance the energy rental process . It could lead to lower overhead/ reduction in middle man costs on energy rental and hence may even lower energy costs for end-users as it becomes safer to delegate resources.
Scenario
Account A gives permission to Account B for delegating/reclaiming resource , Account B delegates Account A energy/bandwidth to Account C , spending bandwidth of Account A
The issue I see is that , correct me if I'm wrong , bandwidth spent to execute delegating /reclaiming resources is on the main account (Account A) when the external account (Account B) is the one executing the transaction.
From what I can see, this could lead to malicious draining of accounts through spam transactions at worse and at best unintentional burning of TRX.
*Note it seems like all permissions for transactions e.g transfer TRX, staking , voting will face this issue. Obviously "transfer TRX" permission gives basically control of the TRX assets in an address , but for other use cases for giving permission of staking or voting , these transactions would cost bandwidth and it is spent from Account A and you may not want to give permission away to "spend" TRX through transaction fees.
Important
This leads to a issue of trust when delegating resources and we should always aim for a trustless solution.
Right now , delegators (energy sellers) need to trust platforms that they will not burn TRX in order to execute delegation and reclaim transactions should the account run out of bandwidth.
What are the use-cases?
-Resource delegators/energy sellers providing resources to energy platforms/third parties without having to trust them that their TRX will not be burned without permissions / limits prevent accidental or nefarious attacks.
-End-users want to prevent accidental burn of TRX by accident when they run out of bandwidth/energy.
-Enabling Managed Staking service (permissions - stake , unstake , vote) without the risk of burning of TRX
Specification
Test Specification
Scope Of Impact
-Permission model
-Transaction payment overhaul
Implementation
One or more of the following options ( there may be alternatives as well)
Option 1) Transaction resource payer permission
A permission setting to make all accounts that have given away resource delegation permissions ( delegate and reclaim) will make the caller/transaction executor (external accounts given the permission) pay the bandwidth.
Option 2) -TRX Burn for transaction resource permission
A permission / setting to prevent the account from burning tron for energy/bandwidth and only use bandwidth/energy from staked TRX
Option 3) Limit to minimum bandwidth/energy required in account
A setting to set a threshold on minimum bandwidth to maintain ( and no TRX will be burned for energy /bandwidth)
This option can be useful for even non energy-sellers, who either run out of bandwidth by accident after executing too many transactions and forget to check that they are out.
If limit is hit , error occurs when trying to sign transaction
Disclaimer
Please excuse my misunderstandings if any and let me know how to improve this.
EDITTED: Updated some terms to clarify example cases ( in particular the naming of Account B as a tenant instead of delegatee) and added more comments
The text was updated successfully, but these errors were encountered: