Minimum Balance and Wallet management

Are there ‘best practices’ for buying Algo’s and holding them in our wallet? Is there a ‘correct’ or ‘better than others’ way to manage the wallet created in a corporate reality and having to offer such a service? (trivially an Exchange in particular or something similar to initialise everything).

If everything is clear to me, then, referring to the formula for calculating the MBR, assuming we have to write 10k docs, the minimum balance of the account should be equal to:

  Formula: (2500 per box) + (400 * (box size + key size)) microAlgos.
  
  Cost of a box: 2500 + (400 * (64 + 6)) = 2500 + 28,000 = 30,500 microAlgos = 0.0305 Algo
  
  So to write 10,000 boxes you need an MBR of 0.0305 * 10,000 = 305 Algo
  
  Cost of 305 Algo in Euro = 305 * 0.11 = 33.55 Euro AS OF DATE 06/11/2023

The calculation was made assuming a box with a length of 64bytes and a box_name of 6bytes.

This therefore means that in addition to the purchase of the necessary Algo’s to carry out the writing operations via our wallet, it will be necessary to carry out these calculations, work out how many Algo’s will be needed to write N number of Boxes and then upload the necessary Algo’s to this application address and keep them there “to confirm” so that we can continue writing within a certain number of Boxes; is this correct?

Hey.

Yes, this is correct. The MBR will be recalculated when creating or resizing a box. For smart contract I’ve written, I will make my ABI method require a payment transaction as one of the first arguments, and check the payment contains the correct amount. Then when deleting a box the MBR is returned back to the user. This ensures the MBR is always accurate and they don’t hold more than is necessary.