Skip to content
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

Proof (Invariant): EntryAction does not allow balances between 0 and <existentialDeposit> #56

Open
ehildenb opened this issue Nov 21, 2019 · 0 comments

Comments

@ehildenb
Copy link
Member

ehildenb commented Nov 21, 2019

Sketch:

    rule 
      <set-balance> 
        <k> ANY_ACTION:EntryAction => . ... </k> 
        <now> _ => _ </now> 
        <events> _ => _ </events> 
        <return-value> _ => _ </return-value> 
        <call-stack> _ => _ </call-stack> 
        <existentialDeposit> EXISTENTIAL_DEPOSIT </existentialDeposit> 
        <creationFee> _ </creationFee> 
        <transferFee> _ </transferFee> 
        <totalIssuance> _ => _ </totalIssuance> 
        <accountList> ACCOUNT_LIST => ?ACCOUNT_LIST' </accountList>
        <accounts> ACCOUNTS => ?ACCOUNTS' </accounts>
      </set-balance> 
      requires accountsValid(ACCOUNT_LIST, ACCOUNTS)
       andBool accountsValid(?ACCOUNT_LIST', ?ACCOUNTS')
       andBool nonDustBalances(ACCOUNT_LIST)
       andBool nonDustBalances(?ACCOUNT_LIST')
  • Subsort EntryAction
  • Function nonDustBalances which cycles through the accounts and checks their respective balances and verifies that they are not dusty (either they are 0 or they are > EXISTENTIAL_DEPOSIT)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant