Skip to content

Conversion from Musicoin to MUS #5

@bengyles

Description

@bengyles

For the conversion itself we have created a webpage that connects to metamask and allows the user to send musicoin to a specific address so we can then send the right ratio of the tokens back to that same address in metamask.

Because of double spending we have to make sure we can verify the transaction is confirmed on the blockchain so we can then make sure it is done only once in case someone tries to do it multiple times.

I still think the best way to do it is to save the transaction to the db and make some kind of queue where we can then poll every x amount of time to see if the transaction has been confirmed by the blockchain (since it could take a few days even with the old chain) and when it is confirmed we can send the tokens from the backend, this could also double as a log in case there are some issues so I wouldn't delete the records but just put their status as "migrated" or something.

the only piece of the puzzle I need to know is how we can check the queue every hour or a few times a day or something
so I think it's best I just keep the musicoin transaction in hurricane and put all the rest in our existing backend, or we could do it with a separate app and db too but then we would have to set that up ofcourse.

First I was thinking of creating a node app to just subscribe to blockchain events, for example listen to transactions sent to a specific address. But if the app is down for some reason some events may be missed so that's why I think it's better to use the db approach here.

what do you think @immartian ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions