Closed xlc closed 3 weeks ago
What do you mean their last purchase price? There was no last purchase price for any chain on Polkadot as of now. How it is supposed to work: https://grillapp.net/@eskimor/agile-coretime-renew-pricing-explained-182686?ref=12935
There was no last purchase price for any chain on Polkadot as of now.
I don’t understand. This is the second sale and the renewal price for first sale is wrong.
Can you explain what does the linked code supposed to do? Why it is (over)writing renew price with target price?
The renewal price is determined well ahead of time, as explained here.
Not sure if I misread or something. but can you explain how is 100 dot renewal price is calculated?
It was set for initialization for the first sale as the first sale has no previous sale to base this number on. All further sales will use the actual sellout price of the previous sale for lease renewal price.
Calculation is roughly based on this.
can you walk the numbers with me please? I want to know how is the number calculated
core 52 is sold 52.86 DOT
but the renewal price is 103 DOT
the renewal bump is 3%
can you point me out which line of code is writing 103 DOT to the stroage and how is the 103 DOT calculated? what are the inputs and which function does the math?
That's indeed weird, but I just figured out what is going on. As in your screenshot, you can see that someone bought core 52, but Aventus renewed core 60: https://coretime-polkadot.subscan.io/extrinsic/329458-2
So the renew status is for a different core. This is why you see an renewal entry with the previous renewal (100) bumped.
@xlc I think that the issue here is that we are talking about the same core, but at different moments in time. When a task renews it's core, it's assigned a completely new core, they don't hold the same that in the previous cycle. So in this case we have:
In the end what's confusing is that renewing a core assigns you to another core for the upcoming cycle, you don't maintain the previous one. So core 52 on Cycle1 has nothing to do with core 52 on Cycle3. The only exception is for leases that always maintain their core.
Thanks for the explanation. I guess the UI need to find some ways to make this bit more obvious.
The renew price suppose to be x% plus last purchase price, which is not happening currently on Polkadot coretime chain. All renews are 100DOT or more and their last purchase prices are well below that.
I think it is caused by this, which overrides the actual price https://github.com/paritytech/polkadot-sdk/blob/b4732add46910370443d092a3f479986060f6df5/substrate/frame/broker/src/tick_impls.rs#L219