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

Handle failed deposits gracefully #146

Closed
pavitthrap opened this issue Sep 2, 2022 · 3 comments · Fixed by #253
Closed

Handle failed deposits gracefully #146

pavitthrap opened this issue Sep 2, 2022 · 3 comments · Fixed by #253
Assignees
Milestone

Comments

@pavitthrap
Copy link
Contributor

pavitthrap commented Sep 2, 2022

If a deposit fails (i.e. a subnets node is unable to mint a deposited asset on the hyperchain), the node should automatically submit that asset for withdrawal.

Moreover, if the deposit function on the hyperchain fails to mint the right quantity, the effects of that mint should be rolled back, and the asset should be submitted for withdrawal as well. For example, this case would apply if a user tried to deposit 100 fungible tokens, and only 50 were minted.

@saralab saralab added this to the 23.2 milestone Jan 9, 2023
@saralab saralab assigned jbencin and unassigned a3slade Jan 17, 2023
@kantai
Copy link
Contributor

kantai commented Jan 23, 2023

Related to #126

@jbencin
Copy link
Member

jbencin commented Apr 10, 2023

I can fairly easily handle the scenario where the transaction fails completely, and do something similar to #126. I am less sure of what to do in this scenario:

For example, this case would apply if a user tried to deposit 100 fungible tokens, and only 50 were minted.

Is something like this even possible? I would guess that if something like this is happening, it is an issue with the FT contract itself, and should be fixed there.

@kantai
Copy link
Contributor

kantai commented Apr 10, 2023

Is something like this even possible? I would guess that if something like this is happening, it is an issue with the FT contract itself, and should be fixed there.

Yeah, it's possible, but I agree with you -- this seems like an error in the FT contract and I don't think the subnet should try to do special handling in this case.

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

Successfully merging a pull request may close this issue.

5 participants