The Polkadot runtime has a large number of parameter values that determine how much a user has to lock up as a deposit when creating a state object. The motivation seems to be something like a state-rent, inducing owner to cleanup object at some point in the future to recover the funds. Here is one example
pub const PreimageBaseDeposit: Balance = deposit(2, 64);
All of these places seem to use a utility routine deposit
, which looks like this
pub const fn deposit(items: u32, bytes: u32) -> Balance {
items as Balance * 20 * DOLLARS + (bytes as Balance) * 100 * MILLICENTS
}
where DOLLARS
and MILLICENTS
are constants for the number of currency units that are approximately worth the corresponding value in USD.
It is however not clear what exactly the rationale is for the form of this deposit function, nor where the magic values 20 and 100 come from.