-
Notifications
You must be signed in to change notification settings - Fork 23
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
FLIP 281: Integrating LostAndFound
with Flow Port and Flow Wallet for Token Transfers
#286
base: main
Are you sure you want to change the base?
Conversation
…or Token Transfers
- **Initialized but lacks storage** | ||
|
||
The amount of extra storage and required FLOW tokens will be calculated and displayed to the sender. If the user confirms the transaction, the required FLOW tokens are also sent to the receiver. In this case the `FeeEstimator` contract will be used, but the tokens can be sent directly to the receiver. | ||
|
||
- **Not initialized** | ||
|
||
The amount of needed storage and required FLOW tokens are calculated and displayed to the sender. Upon confirmation, the tokens and required FLOW for storage will be deposited into the `LostAndFound` contract. The receiver can choose to claim the tokens and FLOW when they are online. |
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.
It is possible to also use a resource we call the Depositor
for this in case you weren't aware:
https://github.com/Flowtyio/lost-and-found/blob/main/contracts/LostAndFound.cdc#L506
You can find sample transactions for its use here:
https://github.com/Flowtyio/lost-and-found/tree/main/transactions/depositor
The issue I've found with FeeEstimator
is that every account on Flow is different. What works the account that does fee estimation might be too little to for another account that intends to use that estimation
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.
Despositor
is great for more advanced use cases but we're not looking to sponsor storage fees for now. We like to show the total cost of transfer to the user for payment.
The issue I've found with FeeEstimator is that every account on Flow is different. What works the account that does fee estimation might be too little to for another account that intends to use that estimation
Can you elaborate on whats the best way to estimate the total cost of interaction (deposit)? Can we use https://github.com/Flowtyio/lost-and-found/blob/main/scripts/lost-and-found/estimate_deposit_nft.cdc?
|
||
#### Using child accounts | ||
|
||
Instead of a contract, the sender could create a child account for the recipient and transfer the tokens there. The recipient can later claim the account. However, the minimum storage balance cannot be claimed by the recipient as accounts cannot be destroyed on Flow, making this solution more costly for the sender and recipient. |
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.
Probably worth mentioning here that the minimum cost for a new account is likely to increase (I think?) Which would drastically increase the minimum needed to send things using this method.
I recall doing benchmarks a very long time ago and found that you could send a few thousand NFTs (very basic ones) for 1 FLOW of storage, it should be the cheapest option by far
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.
Yeah, the storage balance is the deal breaker for this approach. Added a comment af2cddc
We have a basic integration working live on port.flow.com now |
FLIP #281