Renewing SP Lease may be tricky

in blog •  2 months ago 

@hykwf678233 is kind to suggest that to add the support of renewing SP.

image.png

Xiaobao is my friend's account. She saw that the expiration time was 6 am on the 8th, but she didn't consider the time difference. So she sent a new commission at 9 am on the 8th Beijing time. In fact, can we consider launching a renewal function, which can also save the 5 days of withdrawal time, which is more cost-effective and naturally more people will come to rent.

The idea is simple:

If a previous delegation is still not expired, and a payment is received, then we should update the new expiry date for the delegation to be revoked.

However, there is a pitfall here. when the user sends less than the previous payment. For example, he/she only sends 1 STEEM. we should take into consideration this.

The solution is to work out the new expiry date (extended period) for the new delegation, based on the new payment.

I'll need to carefully think about this. Stay tuned!

Steem to the Moon🚀!

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE BLURT!