When a contract is formed between a renter and a provider, they both must lock up at least the full value of this contract upfront. For renters, this is called “allowance” and funds are locked so pay can be guaranteed to the provider at completion. For providers, the locked funds are “collateral” and represent commitment to seeing the contract through to completion. If the contract resolves successfully, the collateral is returned in full to the provider, and the allowance is paid minus any amount left unused. In a trustless network these mechanisms are necessary to ensure all parties are most incentivized to honour their commitments.
In the event that a contract fails, the locked collateral is “burned,” meaning sent to an address out of anyone’s control. Contracts fail if a provider fails a “storage proof” which occur both at contract completion and periodically during the lifetime of a contract. These proofs help ensure the data remains intact and that the provider is online and available. Storage proofs will usually have a 24-hour window to be submitted, meaning providers offline for longer than this duration risk failing some of their contracts.
Providers that form contracts and accept data only to later disappear create holes in the availability of a file. Files are natively redundant on the network to some factor, but should enough providers for a given file disappear, a renter will need to begin a process called “active repair.” This involves pulling shards from the remaining providers (bandwidth to do this costs money), reassembling the file, and redistributing to new providers (also costly). This creates inefficiency for the network beyond a simple penalty of lost collateral. Additionally, the collateral for the providers that became unavailable unfortunately cannot be used to help pay for this repair process and must be burned, else renters may in certain circumstances become motivated to attack their own providers if they become displeased with their service.
Since collateral only becomes locked at contract formation, you only need to cover the amount of used space, and your total capacity isn't directly relevant. The general formula for a maximum possible collateral use case looks like this:
- Price of Collateral (SCP/TB/mo) * Size of total shared space (TB) * maximum duration of contract (months) * 2 (contract renew multiplier)
If you're looking to find out how much collateral is needed per used terabyte, then you would substitute 1 TB instead of total shared space, in the formula above.
Contract renews will briefly require the locking of the new contract before the collateral from the old one is freed. In practice, it is very unlikely more than a small portion of your contracts may be renewing at the same time, and a lower multiplier can be used. Most contracts will also be below the max duration you choose.
It is also very likely that you will have gained some income from your initial contracts before you run out of collateral budget, and you probably don’t need to cover the full amount of space offered to get started as a provider. Consider starting with a smaller amount (perhaps just 30-50 SCP) and adding more as you run out of budget. You do not want to run out of collateral budget as this would make your provider unable to renew your contracts, which is generally considered easy income.
- Your provider will automatically allocate its balance to cover collateral requirements as needed (and within the bounds set during initial config), so aside from monitoring your collateral budget and ensuring it remains comfortably situated, this is a very hands-off process. Just ensure your provider is online, synced, and the wallet is unlocked, or it will not be able to perform its functions.
- Xa-Miner owners should remember that their devices likely come with some SCP to get started with, and may not need to go out and buy more right away.