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

docs: ✏️ Update token transfer scenario in CASESTUDY.md #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all 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
8 changes: 4 additions & 4 deletions CASESTUDY.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Here's a detailed scenario that encapsulates the token transformation and transf

This scenario illustrates the conversion of token states from non-fungible (ERC721) to fungible (ERC20) and their transfer between parties, showcasing the flexibility and liquidity options provided by this innovative token standard.

We can conceptualise the table based on the scenario provided, where Alice sends an ERC721 token to Bob, and then Bob transforms this token to send 0.5 of an ERC20 token to Charle. The `balanceOf()` function's return values for Alice, Bob, and John will be shown in the context of before and after the transactions:
We can conceptualise the table based on the scenario provided, where Alice sends an ERC721 token to Bob, and then Bob transforms this token to send 0.5 of an ERC20 token to Charle. The `balanceOf()` function's return values for Alice, Bob, and Charle will be shown in the context of before and after the transactions:
Copy link
Member

Choose a reason for hiding this comment

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

@futantan "Charlie"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nice catch! but all other places use Charle, I update John to Charle to keep consistency.
Not sure if we need to change all 25 Charle to Charlie


| Return Value of `balanceOf()` | Alice | Bob | Charle |
|-------------------------------|-------|------|------|
Expand All @@ -33,7 +33,7 @@ We can conceptualise the table based on the scenario provided, where Alice sends

- "Before Transaction" shows the initial state before any transfers.
- "After Alice sends to Bob" reflects the state after Alice has transferred the ERC721 token to Bob, leading to Alice's balance decreasing by 1 and Bob's increasing by 1.
- "After Bob transforms & sends to Charle" demonstrates Bob's action of converting the ERC721 token into a malleable form and then transferring 0.5 of an ERC20 token to John. This results in Bob having a balance of 0.5 ERC20 tokens and John receiving 0.5 ERC20 tokens.
- "After Bob transforms & sends to Charle" demonstrates Bob's action of converting the ERC721 token into a malleable form and then transferring 0.5 of an ERC20 token to Charle. This results in Bob having a balance of 0.5 ERC20 tokens and Charle receiving 0.5 ERC20 tokens.

The following table shows the changes in ERC721 ownership for each participant at different stages of the transactions based on the scenario described.

Expand All @@ -59,6 +59,6 @@ Given these actions, here's the expected output of `tokenOfOwnerByIndex(0)` for
|--------|------------------------------------|----------------------------------|-----------------------------------|
| Before Transaction | `0x89..64....0001` | No Token (Bob owns no tokens yet) | No Token (Charle owns no tokens) |
| After Alice sends to Bob | No Token (Alice now owns no tokens) | `0x89..64....0001` | No Token (Charle still owns no tokens) |
| After Bob transforms & sends to Charle | No Token | No Token | No Token (John receives ERC20 tokens, not ERC721) |
| After Bob transforms & sends to Charle | No Token | No Token | No Token (Charle receives ERC20 tokens, not ERC721) |

It's important to note that the transformation of an ERC721 token into a malleable form and its partial transfer as ERC20 tokens to Charle would not generate a new ERC721 token ID for John, as he receives ERC20 tokens, and not a whole unit of it. Therefore, `tokenOfOwnerByIndex(0)` would not return a token ID for John in this context.
It's important to note that the transformation of an ERC721 token into a malleable form and its partial transfer as ERC20 tokens to Charle would not generate a new ERC721 token ID for Charle, as he receives ERC20 tokens, and not a whole unit of it. Therefore, `tokenOfOwnerByIndex(0)` would not return a token ID for Charle in this context.