# Revising rent fee on Astar & Shiden

**URL:** https://forum.astar.network/t/revising-rent-fee-on-astar-shiden/4309
**Category:** Economics
**Created:** [February 7, 2023, 11:21am UTC](https://forum.astar.network/t/revising-rent-fee-on-astar-shiden/4309 "2023-02-07T11:21:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Dino](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Dino](https://forum.astar.network/u/Dino)
#### Post date: [February 7, 2023, 11:21am UTC](https://forum.astar.network/t/revising-rent-fee-on-astar-shiden/4309/1 "2023-02-07T11:21:28Z")

</div>

Hello everyone,

recently we’ve noticed that our fee calculation related parameters on `Shiden` & `Astar` aren’t configured properly. Some things need to be changed and this will have an impact on all our users. Before we do any changes however, we will describe the problem(s) here and the proposed solution.

### Overview

`Astar` & `Shiden`’s fee model is based on Polkadot’s tokenomics research ([here](https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html)). If you are looking for a more in-depth understanding of the fee model, then you are encouraged to read through that paper.

Both `Astar` & `Shiden` use basically the same underlying tehcnology, with `Shiden` being more _cutting edge_ than `Astar`. However, they are configured directly. An easy to understand example is that on `Shiden`, the unbonding period for dApps staking is **5 eras** while for `Astar` it is **10 eras**.

At the genesis block, `Shiden` had the initial total issuance of **70 million SDN**. When `Astar` was being launched, it was decided to increase `Astar`’s total issuance by 100x, making it **7 billion ASTR**. If you participated in crowdloan or lockdrop, you might remember this - your rewards were scaled up by a factor of 100x.

The 100x factor was also applied to `Astar`’s inflation, making block reward (how much new **ASTR** is issued in each block) 100x higher when compared to `Shiden` (this has recently been slightly adjusted but the difference in scale is still very close to 100x).

Unfortunately, this change wasn’t properly propagated to all aspects of the fee calculation.

The focus of this post will only be on _rent fees_ though.

### Rent Fee

The rent fee is charged for certain calls which end up creating new database entries.  
For example, let’s say you propose a new `multisig` call. Some information has to be stored on-chain so that other signatories can check it (e.g. compare the call hash to the call you shared with them) and, if they want, to confirm it & execute it.

Once the call has been executed, it’s no longer important to keep this history in the database so it’s deleted (you can still access it via archive node by checking state at old blocks).

To prevent someone from creating tons of database entries and thus bloating the database, some storage rent fees need to be paid when an DB entry is created. This is called _the rent fee_. Once the storage has been cleaned up, the rent is returned back to the user (a bit different from how it works for renting places 🙂).

E.g. if you initiate a `multisig` call, **X** amount of `ASTR` will be reserved. Once the call has been executed or canceled, the **X** amount is unreserved and returned to you.

### Problem

There are two problems with `Astar` and `Shiden`:

1. The rent fee is way too low. If you execute the aforementioned `multisig` call on `Polkadot`, around **20 DOTs** will be reserved. If you do the same call on `Astar` or `Shiden`, only around **0.0000002**  **ASTR** or **SDN** will be reserved.
2. The rent fee is same on `Astar` and `Shiden`, it doesn’t account for the 100x higher initial total supply and block reward.

### The Solution

The solution to the 1st problem is to introduce an improved formula for calculating rent fees.

`astar_rent_fee = 100 ASTR * number_of_db_entries + 0.01 ASTR * number_of_bytes`

`shiden_rent_fee = 1 SDN * number_of_db_entries + 0.0001 SDN * number_of_bytes`

With the previous example, storage rent for `multisig` would now be around **100 ASTR** or **1 SDN** , make it more comparable to `Polkadot`.

### Additional Change

Since creating a new asset on both `Shiden` and `Astar` is incredibly cheap, we will increase this to:

- **10 SDN** on `Shiden`
- **1000 ASTR** on `Astar`

Please keep in mind this is also _rent fee_.

### Summary

Most of the end user won’t feel this too much since they don’t use functionality like `multisig` or creating new assets (this is done quite seldom).

Feel free to share your thoughts and opinions!

---

<div class="post-metadata">

### Author: ![Poggi\_Luca](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.astar.network/poggi_luca/32/9_2.png) [@Poggi\_Luca](https://forum.astar.network/u/Poggi_Luca)
#### Post date: [February 12, 2023, 9:06pm UTC](https://forum.astar.network/t/revising-rent-fee-on-astar-shiden/4309/2 "2023-02-12T21:06:24Z")

</div>

I agree! This is helpful to avoid spam on the chain and save some memory on nodes storage for useless data.

---

<div class="post-metadata">

### Author: ![Matt](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.astar.network/matt/32/1502_2.png) [@Matt](https://forum.astar.network/u/Matt)
#### Post date: [February 13, 2023, 8:37am UTC](https://forum.astar.network/t/revising-rent-fee-on-astar-shiden/4309/3 "2023-02-13T08:37:54Z")

</div>

This just makes sense to do it. Let’s make it happen.

---

<div class="post-metadata">

### Author: ![Dino](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Dino](https://forum.astar.network/u/Dino)
#### Post date: [February 20, 2023, 10:11am UTC](https://forum.astar.network/t/revising-rent-fee-on-astar-shiden/4309/4 "2023-02-20T10:11:11Z")

</div>

This hasn’t been merged yet since we were waiting for some other changes to be included in the code first (the [PR](https://github.com/AstarNetwork/Astar/pull/815) is here for those who are interested).

But I’d like to bring something new to the discussion which I became aware of just recently.

The `pallet-contracts` module, which provides our runtimes with the capability to run WASM smart contracts, heavily relies on the _rent fee_. For each database entry a user creates, _rent fee_ is charged. Once that DB entry is removed, the _rent fee_ is returned.

So let’s consider a [PSP22](https://github.com/w3f/PSPs/blob/master/PSPs/psp-22.md) smart contract (similar to Ethereum’s **ERC20** ).  
When `Alice` submits a transaction which results in a call to a **PSP22** style smart contract, and a new database entry is created (e.g. how much `Alice` has of this PSP22 asset), some rent fee is charged from her.

I believe that the price of **100 ASTR** would be too much for such operation. Psychologically, it’s a _large_ amount to pay and it might discourage regular users from using WASM.

That being said, I’d like to modify my initial proposal to the following:

`astar_rent_fee = 10 ASTR * number_of_db_entries + 0.01 ASTR * number_of_bytes`

`shiden_rent_fee = 0.1 SDN * number_of_db_entries + 0.0001 SDN * number_of_bytes`

We’re open to comments and suggestions!

EDIT: For the sake of thread completeness, please find the used numbers [here](https://github.com/AstarNetwork/Astar/pull/815). We will also add better description of these numbers to the official docs.
