{{ message }}

# Cash vs MVP Criteria#33

Closed
opened this issue May 14, 2018 · 7 comments
Closed

# Cash vs MVP Criteria#33

opened this issue May 14, 2018 · 7 comments
Projects

### kasima commented May 14, 2018

 Document criteria for choosing to use Cash (+XT) vs MVP The text was updated successfully, but these errors were encountered:
created this issue from a note in Plasma (In progress) May 14, 2018

# Plasma MVP v. Plasma Cash Math

## Plasma MVP

### Bits per Tx

$$\text{bits per tx} = (\text{bits per utxo} + \text{bits per amount} + \text{bits per address} + \text{bits per signature}) * 4$$

$$= (57 + 256 + 160 + 520) * 4 = 3972$$

### Bits per Block

$$\text{bits per block} = \text{bits per tx} * \text{tx per block} = 3972 * \text{tx per block}$$

### Total Bits

$$\text{total bits} = \text{bits per block} * \text{total blocks}$$

### Example

For 2^16 (65536) tx/block we have:

$$\text{bits per block} = 3972 * 65536 = 260308992$$

After 1 year, we have:

$$\text{total bits} = 260308992 * 2103840 = 547648469729280$$

Or ~68456 GB = ~68 TB per year.

## Plasma Cash

### Bits per Tx

Note: Proof size in bits decreases as the total number of watched coins increases because of caching at the higher tree levels.

$$\text{bits per tx} = (\text{tx size in bits}) + (\text{proof size in bits})$$

$$= (\text{bits per coin ID} + \text{bits per address} + \text{bits per signature}) + (\text{merkle depth} * \text{bits per hash})$$

$$= (25 + 160 + 520) + (\log_{2}(\frac{\text{total coins}}{\text{coins per watcher}}) * 256)$$

$$= 705 + \log_{2}(\frac{\text{total coins}}{\text{coins per watcher}}) * 256$$

### Bits per Block

$$\text{bits per block} = \text{bits per tx} * \text{coins per watcher}$$

$$= (705 + \log_{2}(\frac{\text{total coins}}{\text{coins per watcher}}) * 256) * \text{coins per watcher}$$

### Blocks per Checkpoint

$$\text{blocks per checkpoint} = \frac{\text{total coins}}{\text{coins per checkpoint}}$$

### Total Bits

$$\text{total bits} = \text{bits per block} * \text{blocks per checkpoint}$$

### Example

For 2^24 (16777216) total coins and 10000 coins per watcher we have:

$$\text{bits per block} = (705 + \log_{2}(\frac{16777216}{10000}) * 256) * 10000 = 34473456$$

$$\text{total bits} = 34473456 * 2048 = 70601638520$$

Or ~9 GB.

### kasima commented May 16, 2018

 @DavidKnott @kfichter – is it possible to model out exit period growth as MVP scales?

### smartcontracts commented May 16, 2018

 @kasima Yes. I'm checking some gas costs right now and I'll get you a better model in a few.

### smartcontracts commented May 16, 2018

 So the gas cost of an exit is about ~80-90k gas, it's hard to get exact estimates w/o additional information. If we could somehow take up the entire block gas limit (~8m currently), then we'd get about 4m exits completed. Each exit would cost ~\$0.30 @ current gas prices.

### smartcontracts commented May 16, 2018

 That's without challenges and whatever else. We can't assume that every block will be full, so it might be better to only assume 25% block usage ~= 1m exits. Of course that's if everyone instantly sees the block withholding and starts exiting right away. I don't think we'd actually get 1m exits submitted. For reference, current BTC UTXO set is 50m.

### smartcontracts commented May 16, 2018

 In the best case we're probably getting 100 exits/block, likely closer to 10-25 in actuality. So as MVP scales, exit period time would have to scale linearly. I think mass exits are a must.

removed their assignment Dec 28, 2018
added a commit that referenced this issue Mar 25, 2019
 Create cash_vs_mvp_math.md 
 26304a4 
Move notes from issue: #33

### boolafish commented Mar 25, 2019

 Move the note to file: https://github.com/omisego/research/blob/master/plasma/cash_vs_mvp_math.md

closed this Mar 25, 2019