In the previous Soroban design discussion, we came to the following conclusions regarding TemporaryEntries and RestorableEntries:
Outstanding rent_balance of RestorableEntries should not be refunded on deletion but is burned. This is to prevent malicious gamification of the rent system.
TemporaryEntries are discounted compared to RestorableEntries. This incentivizes the use of TemporaryEntries and is better for the health of the network and keeps archives small. As an alternative, we considered adding an additional base fee to RestorableEntries that is refunded on deletion. However, it was determined that incentives at creation time are much more powerful than "cleanup" incentives on deletion. To reduce complexity and give a creation time incentive, TemporaryEntries are discounted compared to RestorableEntries and RestorableEntries do not refund anything on deletion and have no additional base cost.
The following topics are still open questions:
Should TemporaryEntries be able to change their TTL?
Should TemporaryEntries have arbitrary expiration ledgers, or should TemporaryEntries expire at set intervals determined by BucketList internals?
I think we should allow TemporaryEntries to bump their TTL's and that TemporaryEntries should not be able to define arbitrary expiration ledgers. Allowing arbitrary expiration ledgers at the protocol level allows the TemporaryEntry to be used out of the box for security related features. However, this puts more strain on downstream systems such as horizon. Additionally, it is easy for contract developers to enforce arbitrary TTL on their own without a protocol implementation. For example, if a contract needed a TemporaryEntry to only be accessible for 10 ledgers, it would be easy to include and expirationLedger field in the stored struct and check if the entry is still valid after loading it. Security concerns seem outside the scope of protocol storage and should be handled by the contract.