0

I wonder how does one reason about SOL accounting in non-rent-exempt Programs?

It seems to me that static analysis of a Program's balance is impossible besides just assuming that it changes on each storage update (and between blocks, too).

For context: my background is in Ethereum, where most state rent proposals (e.g. EIP-1682) have incorporated a separate opcode for the rent balance.

1 Answer 1

1

It's thankfully very simple -- programs are required to be rent-exempt by the program loader.

2
  • Can't a Program become non-rent-exempt if there's some custom logic that withdraws a sufficient amount of SOL? Commented Sep 1, 2023 at 17:21
  • 1
    No, the program loader owns other programs, so only the program loader can withdraw SOL from other programs. And the program loader only does full withdrawals of accounts. And on top of that, all new accounts must be rent-exempt.
    – Jon C
    Commented Sep 1, 2023 at 19:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.