-
Notifications
You must be signed in to change notification settings - Fork 135
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
Create hip-362-token-freeze-amount.md #395
Open
Topachi
wants to merge
6
commits into
hashgraph:main
Choose a base branch
from
Topachi:master
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3969132
Create hip-362-token-freeze-amount.md
Topachi d0578ed
Update hip-362-token-freeze-amount.md
mohsin-hedera 6be611a
Specification submitted
Topachi d11ed08
Update hip-362-token-freeze-amount.md
mohsin-hedera b9ac2d8
Specification submitted
Topachi 5b43f81
Merge branch 'master' of github.com:Topachi/hedera-improvement-proposal
Topachi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,44 @@ | ||||||||||||||||||||||||||||||||||||||||
**hip: TBD </br> | ||||||||||||||||||||||||||||||||||||||||
title: Integrate '.setTokenAmount()' custom function for 'TokenFreezeTransaction()' </br> | ||||||||||||||||||||||||||||||||||||||||
author: Tomachi Anura [shibartoken@protonmail.com](mailto:shibartoken@protonmail.com)</br> | ||||||||||||||||||||||||||||||||||||||||
type: Standards Track</br> | ||||||||||||||||||||||||||||||||||||||||
category: Service</br> | ||||||||||||||||||||||||||||||||||||||||
needs-council-approval: Yes</br> | ||||||||||||||||||||||||||||||||||||||||
status: Draft</br> | ||||||||||||||||||||||||||||||||||||||||
last-call-date-time:</br> | ||||||||||||||||||||||||||||||||||||||||
created: 22.02.13</br> | ||||||||||||||||||||||||||||||||||||||||
discussions-to:**</br> | ||||||||||||||||||||||||||||||||||||||||
Comment on lines
+2
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Create a discussions for this and add the link to it in line 10 |
||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
## Abstract | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
When "locking" or "freezing" liquidity related to an associated Account Id, There is no way to freeze a specific amount of tokens. The Shibar Network Team strongly believes that it would bring many advantages to have the tokenFreezeTransaction like in the sequent example: | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
<img width="711" alt="Screen Shot 2022-02-13 at 5 44 48 PM" src="https://user-images.githubusercontent.com/96840872/153778591-6ba9b8b7-92a7-4438-b9fb-23e77a469e4d.png"> | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
## Motivation | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
When "locking" or "freezing" liquidity related to an associated Account Id, There is no way to freeze a specific amount of tokens. This could be potentially detrimental in regards of DeFi, if the same token offers many use-cases. As it stands now, Users would have to set different accounts in order to use the same Network. | ||||||||||||||||||||||||||||||||||||||||
Topachi marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
## Rationale | ||||||||||||||||||||||||||||||||||||||||
When Alice participates to a round 1 token pre-sale, she buys 1000 tokens. According to the terms and conditions of the round 1 pre-sale, she should have those tokens frozen and unable to move them from the wallet until the term expires. However Alice would also like to buy more tokens at round 2 which are supposed to be Unfrozen tokens. Unfortunately Hedera only allows to freeze the whole token amount of the account, while it would be much more beneficial to implement a child function .setTokenAmount(Amount) to the parent TokenFreezeTransaction(). | ||||||||||||||||||||||||||||||||||||||||
Topachi marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
This implementation allows Alice to interact with the token if she holds more than the frozen amount. for many use cases, without limiting her whole account by keeping the whole token amount frozen. This way, she can buy another 1000 tokens on round 2, having a total balance of 2000. And she is able to use unfrozen 1000 tokens from round 2 to interact with the network | ||||||||||||||||||||||||||||||||||||||||
Topachi marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
## User Stories | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
- As dApp, I would like to allow users to stake their tokens by freezing a partial amount of TokenX in the user wallet for a pre-determined duration | ||||||||||||||||||||||||||||||||||||||||
## Specification | ||||||||||||||||||||||||||||||||||||||||
Topachi marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||
<img width="846" alt="Screen Shot 2022-04-12 at 5 38 09 PM" src="https://user-images.githubusercontent.com/96840872/163058963-50aef31d-875e-4e1f-970e-60cf1e96430c.png"> | ||||||||||||||||||||||||||||||||||||||||
## Backwards Compatibility | ||||||||||||||||||||||||||||||||||||||||
## Security Implications | ||||||||||||||||||||||||||||||||||||||||
## How to Teach This | ||||||||||||||||||||||||||||||||||||||||
## Reference Implementation | ||||||||||||||||||||||||||||||||||||||||
## Rejected Ideas | ||||||||||||||||||||||||||||||||||||||||
## Open Issues | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
No blocking issues are known at this time. | ||||||||||||||||||||||||||||||||||||||||
## References | ||||||||||||||||||||||||||||||||||||||||
## Copyright/license | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
This document is licensed under the Apache License, Version 2.0 -- see [LICENSE](https://github.com/hashgraph/hedera-improvement-proposal/LICENSE) or (https://www.apache.org/licenses/LICENSE-2.0) |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.