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

Add withdraw/transfer operations #52

Closed
realloc opened this issue Aug 14, 2020 · 3 comments
Closed

Add withdraw/transfer operations #52

realloc opened this issue Aug 14, 2020 · 3 comments
Assignees
Labels
enhancement Improving existing functionality

Comments

@realloc
Copy link

realloc commented Aug 14, 2020

Previously it was possible to manage internal NeoFS Account directly using NeoFS API. It's currently possible by calling NEP-5 internal balance Smart Contract, but in theory, not all users can do it.

Maybe it would be beneficial to add simple Account operations without direct Neo Blockchain interaction, helping to improve user experience.

@alexvanin
Copy link
Contributor

We've decided to implement only withdaw method in accounting service of API.

Transferring assets of internal banking is not common use case for NeoFS network. However it is still possible, because balance contract is NEP-17 compatible. So any wallet with NEP-17 support can do the job when connected to side chain.

In contrary, withdrawing assets is a common use case. Right now the only way to withdraw is to call NeoFS contract from main net. However it requires some GAS to invoke this method. Instead we can use side chain notification to start withdraw procedure in inner ring nodes. It will cost nothing for the user and every storage node will be able to do that.

We'll need a method in balance contract that can verify withdraw origin (storage node is a mediator in the scheme). Based on the format of proof API should provide such method to clients.

@alexvanin
Copy link
Contributor

Based on the format of proof API should provide such method to clients.

After internal discussion with @cthulhu-rider and @realloc we've decided that proof should contain combination of sidechain magic number and epoch number as a nonce. Right now there is no API methods to get these numbers and it blocks implementation. However as soon as it will be implemented, we will return to this enhancement.

@alexvanin
Copy link
Contributor

Withdraw operation requires to use main chain GAS. Thus user should pay fee to alphabet nodes (nspcc-dev/neofs-contract#70). Withdraw operations from side chain do not fit for this economy model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving existing functionality
Projects
None yet
Development

No branches or pull requests

4 participants