ErgoScript Design patterns

One more useful pattern, and part of Ergo from day 1 is the “emission box” pattern, used in emitting mining rewards. All the ergs to be ever emitted are locked in the emission box, and mining rewards are taken by unlocking certain amount of ergs and keeping the balance in a new copy of the destroyed emission box.

The idea of emission boxes is quite general and need not be used only for rewards. For instance, it has been reused in the “fee-emission” boxes in ErgoMix.

5 Likes