Skip to content

Commit

Permalink
Merge branch 'main' into chore/adr-239-example-code
Browse files Browse the repository at this point in the history
  • Loading branch information
leanmendoza authored Nov 6, 2024
2 parents 12feb05 + 4a05bbb commit 4026769
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 8 deletions.
3 changes: 1 addition & 2 deletions content/ADR-133-scene-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ date: 2022-11-17
title: Scene runtime definition
authors:
- menduz
status: Draft
status: Living
type: Standards Track
spdx-license: CC0-1.0
---
Expand Down Expand Up @@ -69,7 +69,6 @@ The runtime for the SDK7 is compatible with [CommonJS](https://en.wikipedia.org/

The exposed RPC modules are defined in the [protocol repository](https://github.com/decentraland/protocol/blob/main/proto/decentraland/kernel/apis/engine_api.proto).

> TODO: define and document naming conventions about code generation for modules

```ts
// `require` instantiates a proxy to a RPC module. Every exposed function
Expand Down
2 changes: 1 addition & 1 deletion content/ADR-144-realm-resolution-from-connection-string.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: adr
adr: 144
title: Realm resolution from connection string
date: 2022-12-13
status: Review
status: Living
type: Standards Track
spdx-license: CC0-1.0
authors:
Expand Down
2 changes: 1 addition & 1 deletion content/ADR-200-raycast-sdk-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: adr
adr: 200
title: Raycasting Component for SDK
date: 2023-03-14
status: Draft # pick one of these
status: Living
type: Standards Track
spdx-license: CC0-1.0
authors:
Expand Down
2 changes: 1 addition & 1 deletion content/ADR-214-pointer-events-sdk-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: adr
adr: 214 # replace this number for the PR or ISSUE number
title: PointerEvents SDK Component & Input system
date: 2023-04-17
status: Draft # pick one of these
status: Living
type: Standards Track
spdx-license: CC0-1.0
authors:
Expand Down
2 changes: 1 addition & 1 deletion content/ADR-215-gltfcomponent-sdk-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: adr
adr: 215
title: GltfContainer SDK Component
date: 2020-02-20
status: Draft # pick one of these
status: Living
type: Standards Track
spdx-license: CC0-1.0
authors:
Expand Down
2 changes: 1 addition & 1 deletion content/ADR-219-static-entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: adr
adr: 219
title: Reserved & Static Entities
date: 2023-04-19
status: Draft
status: Living
type: Standards Track
spdx-license: CC0-1.0
authors:
Expand Down
2 changes: 1 addition & 1 deletion content/ADR-245-player-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: adr
adr: 245
title: Player Components
date: 2023-08-22
status: Review
status: Living
type: Standards Track
spdx-license: CC0-1.0
authors:
Expand Down
59 changes: 59 additions & 0 deletions content/ADR-252-third-party-registry-v3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
layout: adr
adr: 252
title: Third Party Registry V3
date: 2024-10-01
status: Review
type: RFC
spdx-license: CC0-1.0
authors:
- fzavalia
---

# Abstract

This document explores the enhancements introduced by the third version of the Third Party Registry smart contract. Notably, it outlines how Third Parties can now be created by any wallet, with the cost determined by the number of required item slots. Additionally, it explains the concept and benefits of “programmatic” Third Parties within this new framework.

# Context

In the previous version of this smart contract, the creation of Third Parties was restricted to a designated wallet known as the “Third Party Aggregator”. This wallet was responsible for manually adding a Third Party whenever a proposed “Linked Wearable” project was approved through governance in https://decentraland.org/dao/.

This process restricted the number of projects that could be added to Decentraland, necessitating the development of an alternative approach to improve this functionality.

# Proposal

Integrate version 3 of the [Third Party Registry](https://github.com/decentraland/wearables-contracts/blob/91e936526b98f0ac045960507730192121be25ef/contracts/registries/ThirdPartyRegistryV3.sol).

This updated version removes the `onlyThirdPartyAggregator` modifier from the `addThirdParties` function, enabling any wallet to invoke the function, and thereby allowing anyone to create a new third party.

However, invoking this function incurs a cost in MANA for the caller, determined by two primary factors:

**Item Slots**

When creating a third party, the user specifies the number of item slots by setting the `ThirdPartyParam.slots` argument. The number of slots directly influences the amount of MANA required to pay.

Each slot has a fixed price in USD, stored in the `itemSlotPrice` variable. This USD price is then converted to MANA using the [MANA/USD Chainlink price feed](https://data.chain.link/feeds/polygon/mainnet/mana-usd), which determines the final MANA amount the user must pay.

For instance, if MANA is priced at 0.5 USD, and the user wishes to create a Third Party with 10 slots at a rate of 100 USD per slot, the total cost would be 2000 MANA (200 MANA per slot * 10).

**Programmatic Third Parties**

Version 3 introduces the concept of "programmatic" Third Parties. Programmatic TPs refer to third parties whose item representations are generated automatically through a script or other processes. For example, an NFT project with 1000 racing cars may generate car representations through a script that modifies textures or other simple details, rather than creating them manually.

In such cases, users can designate a third party as programmatic by setting the `_areProgrammatic` variable in the `addThirdParties` function as `true`.

Programmatic third parties are charged a fixed rate based on the `programmaticBasePurchasedSlots` variable. For example, if this variable is set to 20, a programmatic TP will be billed as if it had 20 item slots. However, there is no limit to the number of item slots a programmatic TP can actually have.

Given that programmatic Third Parties are reviewed by curators before being made available on the platform, users cannot exploit the different pricing models for programmatic and non-programmatic Third Parties. For instance, a user attempting to create a Third Party with 30 manually created items and marking it as programmatic to pay less would fail to comply with the committee's rules and would not be approved.

---

The `buyItemSlots` function has been updated to allow programmatic Third Party managers to add more item slots for free if the initial amount defined was insufficient.

This function enables users to add item slots to their Third Parties. For non-programmatic Third Parties, the cost of adding additional slots remains the same as the price per slot at the time of creation.

# Conclusion

This version of the Third Party Registry removes the reliance on the Third Party Aggregator by allowing anyone to create Third Parties at any time, with the associated cost being collected by the DAO.

This change grants users greater control and flexibility in managing their projects within the platform.

0 comments on commit 4026769

Please sign in to comment.