jito-foundation / restaking

https://docs.restaking.jito.network/
Other
54 stars 5 forks source link

Vault + Restaking: slots are set to 0 upon initialization, but should be set to the current slot #83

Closed buffalu closed 1 month ago

buffalu commented 1 month ago

via felix @ asymmetric:

One pattern that seems a bit risky is that you initialize fields like VaultOperatorDelegation::last_update_slot to 0 when the account is created. I think it would be more correct to set them to the current slot during creation.

For SlotToggle structs, we should be setting the slot added and slot removed to the current slot