# Entropy consumption description

## Entropy acquisition method and entropy consumption formula

Developers can obtain entropy dynamically allocated by freezing VS to obtain entropy (freezing/total number of networks * total available, currently 100 billion), or directly burning VS to obtain fixed entropy (currently 1 entropy = 10 vdt).

Under normal circumstances, both of these strategies should provide sufficient entropy for the deployment/execution of smart contracts. However, due to the way the fee_limit is set, if the developer freezes too much VS entropy, the entropy calculation of the account will be bound to the freezing model. The maximum entropy limit that this account can use is fee_limit (up to 1000 VS)/total network freeze VS * 100 billion. If the upper limit is hit, an OUT_OF_ENTROPY error will be thrown without burning VS. If the entropy of freezing is not too much, the two strategies can be combined to consider the total entropy of use.

Calculation formula:

```
const R = Dynamic entropy Limit
const F = Daily account entropy from freezing VS
const E = Remaining daily account entropy from freezing VS
const L = Fee limit in VS set in deploy/trigger call
const T = Remaining usable VS in account
const C = Entropy per VS if purchased directly
// Calculate M, defined as maximum entropy limit for deployment/trigger of smart contract
if F> L*R
let M = min(E+T*C, L*R)
else
let M = E+T*C
```

Developers do not recommend freezing too many VSs (not necessary, and unfriendly to others in the entire community ecology). Other personnel will be restricted to a lower upper entropy limit unless VS is burned directly. If the account is in this situation and a large contract needs to be deployed, please try to unfreeze some VS or transfer VS to a new account without freezing the entropy.

Updated over 1 year ago