Closed mybit-bot closed 5 years ago
- Calculation of Block number for verification deadline should be done on the back-end.
@mybit-bot @jjperezaguinaga Could you please clarify this requirement, as is this application doesn't appear to have a backend currently (other than the smart contracts/blockchain) How would you like the backend implemented? A simple node app with a single GET endpoint returning number of blocks for a given number of days is ok?
Edit: Thinking on this further, it needs the contracts updating to use block.timestamp instead of block number, so that things don't go wrong with the ice-age and/or future hard forks that change the average blocktime.
@csmartinsfct @jjperezaguinaga can one of you respond to ^^
@StevenJNPearce the term backend
was somewhat misused there, it basically means the number of days is automatically calculated by the dApp.
Regarding your edit, good point. @kyledewy can you comment on that?
Yaa it should definitely be using timestamp. Block number is always an approximation based on recent network usage, so it would be the same case after a hard fork. Timestamp is a better option for this dapp, since there doesn't seem to be much incentive for miners to adjust the blocks timestamp.
Introduction: To enhance the user experience of MyBit Will (will.mybit.io) We want to replace the current method of verifying life based on Block numbers with number of days.
Current Behaviour: Choose in how many blocks one must verify they are alive.
Desired Behaviour: Choose an amount in days and the block number to distribute is calculated on the back-end without the user knowing. Requirements:
To Submit:
Disclaimer All work completed via the MyBit Decentralised Development Fund is property of the MyBit Foundation (CHE-177.186.963) and may be used, re-used, and/or distributed, re-distributed by the MyBit Foundation for financial gain. The contributor holds no warrant nor claims for any future payments resulting from monetisation schemes originating from the MyBit Foundation or any of its affiliates. Where law permits outside of open source regulations, the contributor is not permitted to distribute any work completed via the MyBit Decentralised Development Fund (DDF) for personal gain.