# Arbitrum Introduction

Arbitrum is a true layer 2 solution for Ethereum based on optimistic rollups. In exchange for some ease-of-use trade-offs, transactions on Arbitrum are much faster and cheaper.&#x20;

"Arbitrum is an L2 scaling solution for Ethereum...**"** $$^{1}$$ which uses optimistic rollups to reduce gas fees while offering the security guarantees of the Ethereum network.

Rollup explainer: <https://www.youtube.com/watch?v=7pWxCklcNsU>

(And how this relates to $$ saved for the user.)

In short, all transaction data is made available on mainnet (Ethereum) but optimistic rollups use a separate network (Arbitrum) to perform network calculations. Transaction validity is guaranteed by a crypto-economic challenge process.

Network security guarantees are especially important platforms in which users lock up a significant amount of capital for a significant amount of time.  While there are other networks and sidechains that are cheaper and faster, Ethereum roll-up solutions (Arbitrum, Optimism, ZKrollups, etc.) offer the highest security guarantees while minimizing transaction costs.

Read more about Roll-ups here: <https://research.paradigm.xyz/rollups>

Read more about Arbitrum here <https://medium.com/offchainlabs/how-arbitrum-rollup-works-39788e1ed73f>

Arbitrum vs. Optimism: <https://twitter.com/krzKaczor/status/1395812308451004419>

When creating a non-fungible piggy on the Ethereum mainnet, the gas costs were quite demanding. This is due to the amount of information needed to correctly execute a piggy.\
Layer 1 gas costs were running around:&#x20;

##

| Layer 1 action | gas consumed | gas price | fee (ETH) | ETHUSD | fee (USD) |
| :------------: | ------------ | --------- | --------- | ------ | --------- |
|     create     | 319408       | 10 gwei   | 0.0031941 | $200   | $ 0.64    |
|     auction    | 182889       | 10 gwei   | 0.0018289 | $200   | $ 0.37    |
|     oracle     | 211342       | 10 gwei   | 0.0021134 | $200   | $ 0.42    |

Previously the gas costs and transaction fees were tenable. A lot of gas was consumed when interacting with the SmartPiggies contracts, but the gas costs (\~10 gwei) and Ethereum US Dollar cross rate (\~$200) were low. When everything goes up, so does the transaction fees. When we look at current prices $$^{2}$$ the story changes:

| Layer 1 action | gas consumed | gas price | fee (ETH) | ETHUSD | fee (USD) |
| -------------- | ------------ | --------- | --------- | ------ | --------- |
| create         | 319408       | 100 gwei  | 0.0319408 | $2000  | $63.88    |
| auction        | 182889       | 100 gwei  | 0.0182889 | $2000  | $36.58    |
| oracle         | 211342       | 100 gwei  | 0.0211342 | $2000  | $42.26    |

The fees in the current market have increased by a factor of 100. If gas cost fluctuation is taken into account, when there is a market event and the gas price goes above 200 gwei, settling a piggy goes from $42 to $88 right when one may want to take that piggy action. This does not make for a great user experience.

If we look at the reductions from using Arbitrum, we get the following picture:

| Layer 2 action | gas consumed | gas price | fee (ETH) | ETHUSD | fee (USD) |
| -------------- | ------------ | --------- | --------- | ------ | --------- |
| create         | 6752         | 100 gwei  | 0.0006752 | $2000  | $1.35     |
| auction        | 5728         | 100 gwei  | 0.0005728 | $2000  | $1.16     |
| oracle         | 2656         | 100 gwei  | 0.0002656 | $2000  | $0.53     |

Using Arbitrum as a scaling solution, SmartPiggies can be created, auctioned, and settled for under $5. This is more in line with the SmartPiggies mission or bringing access and opportunity, where before there was little to none.<br>

There are other advantages to using a layer 2 solution, for example escaping the code size limitations inherent to the Ethereum mainnet, and yet more advantages to using Arbitrum. For more information, please visit the Arbitrum [docs](https://developer.offchainlabs.com/docs/inside_arbitrum).&#x20;

## Footnotes

1 <https://developer.offchainlabs.com/docs/inside_arbitrum>

2 At current prices as of 2021<https://ethgasstation.info/index.php>
