Let’s make this clear first: whenever you extend your alpaca locking to 52 weeks, your xAlpaca balance is supposed to resume to exactly the same number as your locked alpaca just as the very first time, and then it shrinks gradually.
However, it is not how the contract actually works.
I just extend my locking to 52 weeks, and my xAlpaca balance is 98% of my locked alpaca token, which means I can’t fully enjoy the benefit of locking my alpaca tokens.
My guess is this is somehow related to the very first time of locking, like how close it is to the weekly epoch time?
When we talk about a bug, we talk about how the code differs from the design. You refer to the code as the design, this way I believe there will never be any bug in the world.
If you check the examples given in the gov-vault doc, there are some more proof as following.
You are right about one year has some more days than 52 weeks, but indeed, thanks to this we should fully get 100% xAlpaca balance , instead of 52/53 of them, by locking alpaca for 52 weeks.
Example 1:
Alice locked 100 ALPACA for 52 weeks and received 100 xALPACA
26 weeks have passed. Alice’s xALPACA balance became 50
Example 2:
John locked 100 ALPACA for 26 weeks , and received 50 xALPACA
Feeling like a llama, John then decided he’d prefer to get a higher multiple on his rewards so he extended his lockup from 26 to 52 weeks, and received an additional 50 xALPACA, bringing his total balance to 100 xALPACA
1.) “CurrentTime” is the time the snapshot is taken each Thursday
2.) UnlockTime is when the ALPACA will be unlocked based on users selection. Since the unlock time is always forced to fall on Thursday, everyone who choose max lock. will have same unlock time regardless of when they lock it.
3.) Regardless of the xALPACA balance prior to the snapshot (which will depend a bit on the lock time), everyone with “max lock time” will have same xALPACA balance at the first snapshot
4.) The amount is all relative, meaning it affects everyone equally, it affects everyone equally. and no-one who does max lock really gets “diluted” even though xALPACA balance is slightly less than 1 at max lock. You are still getting max lock b/c no one else also has 1xALPACA.
Hope this answers your question.
We can change the language in the docs to reflect the nuance in the actual implementation if it’s a source of confusion.