Skip to content
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
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions hip-362-token-freeze-amount.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
**hip: TBD </br>
Copy link
Collaborator

@mgarbs mgarbs Apr 19, 2022

Choose a reason for hiding this comment

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

Suggested change
**hip: TBD </br>
---
hip: 395

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
Copy link
Collaborator

@mgarbs mgarbs Apr 19, 2022

Choose a reason for hiding this comment

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

Suggested change
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>
title: Integrate `.setTokenAmount()` custom function for `TokenFreezeTransaction()`
author: Tomachi Anura [shibartoken@protonmail.com](mailto:shibartoken@protonmail.com)
type: Standards Track
category: Service
needs-council-approval: Yes
status: Draft
last-call-date-time:
created: 22.02.13
discussions-to:**
---

Copy link
Collaborator

Choose a reason for hiding this comment

The 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)