Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lowering Deposit Requirements on Polkadot and Kusama Asset Hub #45

Merged
Merged
Changes from 31 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
d3f3e16
Init 000x-assethub.md
poppyseedDev Nov 2, 2023
4c90e8e
Update 000x-assethub.md - initial text
poppyseedDev Nov 2, 2023
a1c6854
Implementing prices 000x-assethub.md
poppyseedDev Nov 2, 2023
316cd45
Update 000x-assethub.md
poppyseedDev Nov 7, 2023
7d5e9c3
Update 000x-assethub.md
poppyseedDev Nov 7, 2023
0a217aa
Update 000x-assethub.md - adding usernames
poppyseedDev Nov 7, 2023
4ba607f
Update 000x-assethub.md
poppyseedDev Nov 7, 2023
d40dffd
Update text/000x-assethub.md Update headline
poppyseedDev Nov 7, 2023
6d297fb
Update 000x-assethub.md
poppyseedDev Nov 7, 2023
0e49a4f
Update 000x-assethub.md - added vikiival as contributor
poppyseedDev Nov 8, 2023
3b48582
Update text/000x-assethub.md
poppyseedDev Nov 16, 2023
cef02e1
Update text/000x-assethub.md
poppyseedDev Nov 16, 2023
88c0f69
:memo: wording
vikiival Jan 9, 2024
cfc84ed
Merge remote-tracking branch 'origin/main' into feat/grammar-x-pricing
vikiival Jan 9, 2024
a15b1bd
:memo: :zap: calculations
vikiival Jan 9, 2024
edf6758
:memo: update author name
vikiival Jan 9, 2024
4079c29
:zap: :memo: pricing for kusama asset hub
vikiival Jan 9, 2024
e9a81d4
:memo: wording
vikiival Jan 9, 2024
28e217a
:memo: :bug: wording
vikiival Jan 9, 2024
9541841
Update text/000x-assethub.md
poppyseedDev Jan 9, 2024
5b34f67
Update text/000x-assethub.md
poppyseedDev Jan 9, 2024
4237d37
Merge pull request #1 from poppyseedDev/feat/grammar-x-pricing
poppyseedDev Jan 9, 2024
a3d3cb1
Update 000x-assethub.md
poppyseedDev Jan 9, 2024
731d0c1
Update 000x-assethub.md
poppyseedDev Jan 10, 2024
d16fa29
Update 000x-assethub.md
poppyseedDev Jan 11, 2024
c464459
Update and rename 000x-assethub.md to 000x-lowering-deposits-assethub.md
poppyseedDev Jan 11, 2024
17b5448
Update 000x-lowering-deposits-assethub.md
poppyseedDev Jan 11, 2024
3328781
Update 000x-lowering-deposits-assethub.md
poppyseedDev Jan 11, 2024
33194da
Update 000x-lowering-deposits-assethub.md changing the ending
poppyseedDev Jan 11, 2024
23b9bab
Merge pull request #2 from poppyseedDev/poppyseedDev-patch-1
poppyseedDev Jan 11, 2024
c6e9970
Update text/000x-lowering-deposits-assethub.md
poppyseedDev Jan 18, 2024
f519da0
::
vikiival Jan 19, 2024
f4fa857
rename with rfc number
joepetrowski Jan 31, 2024
a8dcdf2
break lines
joepetrowski Jan 31, 2024
3ad68dd
change some wording and typos
joepetrowski Jan 31, 2024
759c140
Merge branch 'polkadot-fellows:main' into polkadot-asset-hub
vikiival Jan 31, 2024
823013e
add decision on sigmoid function
joepetrowski Feb 11, 2024
0bb0f60
Apply suggestions from code review
joepetrowski Feb 12, 2024
a7319f0
table format
joepetrowski Feb 12, 2024
c7edfc3
Update text/0045-nft-deposits-asset-hub.md
poppyseedDev Feb 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
197 changes: 197 additions & 0 deletions text/000x-lowering-deposits-assethub.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
# RFC-0000: Lowering NFT Deposits on Polkadot and Kusama Asset Hubs

| | |
| --------------- | -------------------------------------------------------------------------------------------------- |
| **Start Date** | 2 November 2023 |
| **Description** | A proposal to reduce the minimum deposit required for collection creation on the Polkadot and Kusama Asset Hub, making it more accessible and affordable for artists. |
| **Authors** | [Aurora Poppyseed](https://github.com/poppyseedDev), [Just_Luuuu](https://github.com/justLuuuu), [Viki Val](https://github.com/vikiival) |

## Summary

This RFC proposes changing the current deposit requirements on the Polkadot and Kusama Asset Hub for creating NFT collection, minting an individual NFT, and lowering it's coresponding metadata and attribute deposit. The objective is to lower the barrier to entry for NFT creators, fostering a more inclusive and vibrant ecosystem while maintaining network integrity and preventing spam.

## Motivation

The current deposit of 10 DOT for collection creation (along with 0.01 DOT for item deposit and 0.2 DOT for metadata and attribute deposit) on the Polkadot Asset Hub and 0.1 KSM on Kusama Asset Hub presents a significant financial barrier for many NFT creators. By lowering the deposit requirements, we aim to encourage more NFT creators to participate in the Polkadot NFT ecosystem, thereby enriching the diversity and vibrancy of the community and its offerings.

The actual implementation of the deposit is an arbitrary number coming from [Uniques pallet](https://github.com/paritytech/polkadot-sdk/blob/master/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs#L757). It is not a result of any economic analysis. This proposal aims to adjust the deposit from constant to dynamic pricing based on the `deposit` function with respect to stakeholders.
vikiival marked this conversation as resolved.
Show resolved Hide resolved

### Requirements

- Deposit SHOULD be derived from `deposit` function adjusted by correspoding pricing mechansim.

## Stakeholders

- **NFT Creators**: Primary beneficiaries of the proposed change, particularly those who found the current deposit requirements prohibitive.
- **NFT Platforms**: As the facilitator of artists' relations, NFT Marketplaces has a vested interest in onboarding new users and making the platform more accessible.
- **dApp Developers**: Making the blockspace more accessible will encourage developers to create and build unique dApps in the Polkadot ecosystem.
- **Polkadot Community**: Stands to benefit from an influx of artists, creators and diverse NFT collections, enhancing the overall ecosystem.

Previous discussions have been held within the Polkadot Forum community and with artists expressing their concerns about the deposit amounts. [Link](https://forum.polkadot.network/t/polkadot-assethub-high-nft-collection-deposit/4262).

## Explanation
This RFC proposes a revision of the deposit constants in the nfts pallet on the Polkadot Asset Hub. The new deposit amounts would be determined by a standard deposit formula.

This RFC suggests modifying deposit constants defined in the `nfts` pallet on the Polkadot Asset Hub to require a lower deposit. The reduced deposit amount should be determined by the `deposit` adjusted by the pricing mechanism (arbitrary number/another pricing function).

### Current code structure

[Current deposit requirements are as follows](https://github.com/polkadot-fellows/runtimes/commit/c2a3c9881c0ee6393d1665fefd9671d040215188#diff-32714ab945a24cbcc5979fd9065e0c13e0beb59f7533b38e2e97a872b23cb125R596-R600)

Looking at the current code structure the currently implemented we can find that the pricing re-uses the logic of how Uniques are defined:

```rust
parameter_types! {
// re-use the Uniques deposits
pub const NftsCollectionDeposit: Balance = UniquesCollectionDeposit::get();
pub const NftsItemDeposit: Balance = UniquesItemDeposit::get();
pub const NftsMetadataDepositBase: Balance = UniquesMetadataDepositBase::get();
pub const NftsAttributeDepositBase: Balance = UniquesAttributeDepositBase::get();
pub const NftsDepositPerByte: Balance = UniquesDepositPerByte::get();
}
```

In the existing setup, the Uniques are defined with specific deposit values for different elements:

```rust
parameter_types! {
pub const UniquesCollectionDeposit: Balance = UNITS / 10; // 1 / 10 UNIT deposit to create a collection
pub const UniquesItemDeposit: Balance = UNITS / 1_000; // 1 / 1000 UNIT deposit to mint an item
pub const UniquesMetadataDepositBase: Balance = deposit(1, 129);
pub const UniquesAttributeDepositBase: Balance = deposit(1, 0);
pub const UniquesDepositPerByte: Balance = deposit(0, 1);
}
```
As we can see in the code definition above the current code does not use the `deposit` funtion when the collection in the following instances: `UniquesCollectionDeposit` and `UniquesItemDeposit`.

### Proposed Modification Using the Deposit Function

This proposed modification adjusts the deposits to use the `deposit` function instead of using an arbitrary number.

```rust
parameter_types! {
pub const NftsCollectionDeposit: Balance = deposit(1, 130);
pub const NftsItemDeposit: Balance = deposit(1, 164);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you generate these inputs? Not saying they are wrong, would just like to see a note about it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pub const NftsMetadataDepositBase: Balance = deposit(1, 129);
pub const NftsAttributeDepositBase: Balance = deposit(1, 0);
pub const NftsDepositPerByte: Balance = deposit(0, 1);
}
```

Calculations viewed bellow were calculated by using the following repository [rfc-pricing](https://github.com/vikiival/rfc-pricing).
**Polkadot**
| **Name** | **Current price implementation** | **Proposed Modified by using the new deposit function** |
|---------------------------|----------------------------------|-------------------------|
| collectionDeposit | 10 DOT | 0.20064 DOT |
| itemDeposit | 0.01 DOT | 0.20081 DOT |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, 20x increase.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's why we propose a further reduction for itemDeposit in the next paragraph by 40

pub const NftsItemDeposit: Balance = deposit(1, 164) / 40;

| metadataDepositBase | 0.20129 DOT | 0.20076 DOT |
| attributeDepositBase | 0.2 DOT | 0.2 DOT |

Similarly the prices for Kusama ecosystem were calculated as:
**Kusama:**
| **Name** | **Current price implementation** | **Proposed Price in KSM** |
|---------------------------|----------------------------------|---------------------------|
| collectionDeposit | 0.1 KSM | 0.006688 KSM |
| itemDeposit | 0.001 KSM | 0.000167 KSM |
| metadataDepositBase | 0.006709666617 KSM | 0.0006709666617 KSM |
| attributeDepositBase | 0.00666666666 KSM | 0.000666666666 KSM |


### Enhanced Approach to Further Lower Barriers for Entry
In an effort to further lower barriers to entry and foster greater inclusivity, we propose additional modifications to the pricing structure. These proposed reductions are based on a collaborative and calculated approach, involving the consensus of leading NFT creators within the Polkadot and Kusama Asset Hub communities. The adjustments to deposit amounts are not made arbitrarily. Instead, they are the result of detailed discussions and analyses conducted with prominent NFT creators.

**Proposed Code Adjustments**
```rust
parameter_types! {
pub const NftsCollectionDeposit: Balance = deposit(1, 130);
pub const NftsItemDeposit: Balance = deposit(1, 164) / 40;
pub const NftsMetadataDepositBase: Balance = deposit(1, 129) / 10;
pub const NftsAttributeDepositBase: Balance = deposit(1, 0) / 10;
pub const NftsDepositPerByte: Balance = deposit(0, 1);
}
```

**Prices and Proposed Prices on Polkadot Asset Hub:**

**Polkadot**
| **Name** | **Current price implementation** | **Proposed Prices** |
|---------------------------|----------------------------------|---------------------|
| collectionDeposit | 10 DOT | 0.20064 DOT |
| itemDeposit | 0.01 DOT | 0.005 DOT |
| metadataDepositBase | 0.20129 DOT | 0.002 DOT |
| attributeDepositBase | 0.2 DOT | 0.002 DOT |

**Kusama**
| **Name** | **Current price implementation** | **Proposed Price in KSM** |
|---------------------------|----------------------------------|---------------------------|
| collectionDeposit | 0.1 KSM | 0.006688 KSM |
| itemDeposit | 0.001 KSM | 0.000167 KSM |
| metadataDepositBase | 0.006709666617 KSM | 0.0006709666617 KSM |
| attributeDepositBase | 0.00666666666 KSM | 0.000666666666 KSM |


## Discussion of Other Proposals
Several innovative proposals have been considered to enhance the network's adaptability and manage deposit requirements more effectively:

### Enhanced Weak Governance Origin Model
The concept of a weak governance origin, controlled by a consortium like the System Collective, has been proposed. This model would allow for dynamic adjustments of NFT deposit requirements in response to market conditions, adhering to storage deposit norms.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the System Collective?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, OK but that doesn't exist, so it's an extra step of creating this collective (which has turned out to be a bit like herding cats). I think for simplicity and fewer dependencies I would recommend setting it to some existing track (or even a new one) like General Admin.

Then if someone proposes a collective, they can propose the other way around, as in that their collective's origin gains permissions of this action.


**Enhancements and Concerns:**
- **Responsiveness**: To address concerns about delayed responses, the model could incorporate automated triggers based on predefined market indicators, ensuring timely adjustments.
- **Stability vs. Flexibility**: Balancing stability with the need for flexibility is challenging. To mitigate the issue of frequent changes in DOT-based deposits, a mechanism for gradual and predictable adjustments could be introduced.
- **Scalability**: The model's scalability is a concern, given the numerous deposits across the system. A more centralized approach to deposit management might be needed to avoid constant, decentralized adjustments.

### Function-Based Pricing Model
Another proposal is to use a mathematical function to regulate deposit prices, initially allowing low prices to encourage participation, followed by a gradual increase to prevent network bloat.

**Refinements:**
- **Choice of Function**: A logarithmic or sigmoid function is favored over an exponential one, as these functions increase prices at a rate that encourages participation while preventing prohibitive costs.
- **Adjustment of Constants**: To finely tune the pricing rise, one of the function's constants could correlate with the total number of NFTs on AssetHub. This would align the deposit requirements with the actual usage and growth of the network.

### Linking Deposit to USD(x) Value
This approach suggests pegging the deposit value to a stable currency like the USD, introducing predictability and stability for network users.

**Considerations and Challenges:**
- **Market Dynamics**: One perspective is that fluctuations in native currency value naturally balance user participation and pricing, deterring network spam while encouraging higher-value collections. Conversely, there's an argument for allowing broader participation if the DOT/KSM value increases.
- **Complexity and Risks**: Implementing a USD-based pricing system could add complexity and potential risks. The implementation needs to be carefully designed to avoid unintended consequences, such as excessive reliance on external financial systems or currencies.

Each of these proposals offers unique advantages and challenges. The optimal approach may involve a combination of these ideas, carefully adjusted to address the specific needs and dynamics of the Polkadot and Kusama networks.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can probably do a combination of these two. It'd require some implementation, so switching to deposit() would be phase one, and then we could do something like:

  • Function 1: Deposit (in DOT) as a function of number of collections.
  • Function 2: Fixed USD(x) cost as a ceiling.
  • Actual deposit: min(F1, F2)

Copy link
Contributor

@muharem muharem Jan 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious about the motivation behind increasing the deposit based on the number of collections. If the proposed floor deposits are too low to prevent spam, in theory, the function will adjust the deposit value to a more reasonable one and continue to grow, potentially raising a barrier for creators again.

This leads me to think that the primary challenge is to find an optimal deposit value, which depends on the DOT/USD price and our current technology state (as mentioned by @burdges here). If there is no optimal value, we will need to explore technical solutions.

If what I've said withstands criticism, we could have a scale factor parameter that can be changed through a referendum and deposits could also be linked to the USD price. Additionally, we should explore and learn how to estimate such an optimal deposit value.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've kept silliness like smart contracts off AssetHub, so in theory AssetHub should benefit fully form our scalablity, meaning AssetHub could aquire more capacity form polkadot. We do not even have elastic scaling yet though, much less confidence that AssetHub eploits it properly, so "optimal" sounds unknowable right now, or more it could change.


## Drawbacks
Modifying deposit requirements necessitates a balanced assessment of the potential drawbacks. Highlighted below are cogent points extracted from the discourse on the [Polkadot Forum conversation](https://forum.polkadot.network/t/polkadot-assethub-high-nft-collection-deposit/4262), which provide critical perspectives on the implications of such changes:

The discourse around modifying deposit requirements includes various perspectives:

Adjusting NFT deposit requirements on Polkadot and Kusama Asset Hubs involves key challenges:

1. **State Growth and Technical Concerns**: Lowering deposit requirements can lead to increased blockchain state size, potentially causing state bloat. This growth needs to be managed to prevent strain on the network's resources and maintain operational efficiency.

2. **Network Security and Market Response**: Reduced deposits might increase transaction volume, potentially bloating the state, thereby impacting network security. Additionally, adapting to the cryptocurrency market's volatility is crucial. The mechanism for setting deposit amounts must be responsive yet stable, avoiding undue complexity for users.

3. **Economic Impact on Previous Stakeholders**: The change could have varied economic effects on previous (before the change) creators, platform operators, and investors. Balancing these interests is essential to ensure the adjustment benefits the ecosystem without negatively impacting its value dynamics. However in the particular case of Polkadot and Kusama Asset Hub this does not pose a concern since there are very few collections currently and thus previous stakeholders wouldn't be much affected. As of date 9th January 2024 there are 42 collections on Polkadot Asset Hub and 191 on Kusama Asset Hub with a relatively low volume.

## Testing, Security, and Privacy

### Security concerns

The prevention of "spam" could be prevented by OpenGov proposal to `forceDestoy` list of collections that are not suitable.

## Performance, Ergonomics, and Compatibility

### Performance
The primary performance consideration stems from the potential for state bloat due to increased activity from lower deposit requirements. It's vital to monitor and manage this to avoid any negative impact on the chain's performance. Strategies for mitigating state bloat, including efficient data management and periodic reviews of storage requirements, will be essential.

### Ergonomics
The proposed change aims to enhance the user experience for artists, traders and utilizers of Kusama and Polkadot asset hub. Making Polkadot and Kusama more accessible and user-friendly.

### Compatibility
The change does not impact compatibility as `redeposit` function is already implemented.

## Unresolved Questions
There remain unresolved questions regarding the implementation of a function-based pricing model for deposits and the feasibility of linking deposits to a USD(x) value. These aspects require further exploration and discussion to ascertain their viability and potential impact on the ecosystem.

## Future Directions and Related Material
We recommend initially lowering the deposit to the suggested levels. Subsequently, based on the outcomes and feedback, we can continue discussions on more complex models such as function-based pricing or currency-linked deposits.


If accepted, this RFC could pave the way for further discussions and proposals aimed at enhancing the inclusivity and accessibility of the Polkadot ecosystem.