-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Spec] Delegation pool spec #23
base: dev
Are you sure you want to change the base?
Conversation
spec initialize_delegation_pool { | ||
pragma verify = true; | ||
include stake::ResourceRequirement; | ||
/// [high-level-req-1] | ||
let owner_address = signer::address_of(owner); | ||
let seed = spec_create_resource_account_seed(delegation_pool_creation_seed); | ||
let resource_address = account::spec_create_resource_address(owner_address, seed); | ||
ensures exists<DelegationPoolOwnership>(TRACE(owner_address)); | ||
// ensures exists<DelegationPool>(resource_address); | ||
// ensures exists<stake::StakePool>(TRACE(resource_address)); | ||
/// [high-level-req-2] | ||
let signer_address = global<DelegationPool>(resource_address).stake_pool_signer_cap.account; | ||
let pool_address_in_owner = global<DelegationPoolOwnership>(TRACE(owner_address)).pool_address; | ||
// ensures TRACE(signer_address) == TRACE(pool_address_in_owner); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems there's no property in this block, all properties are commented out.
spec coins_to_transfer_to_ensure_min_stake { | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these empty block serve any purpose? If no, then delete.
spec update_governanace_records_for_redeem_pending_inactive_shares { | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty block
spec buy_in_active_shares { | ||
pragma verify = true; | ||
let new_shares = pool_u64::amount_to_shares(pool.active_shares, coins_amount); | ||
|
||
ensures new_shares == 0 ==> result == 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is trivial property, perhaps we want to assert that appropriate amount of shares are actually given in active_shares
pool at the end of the buy_in
.
No description provided.