gnosisguild / wand-nft

wand-nft.vercel.app
8 stars 6 forks source link

XP and Reputation #34

Closed samepant closed 2 years ago

samepant commented 2 years ago

Our NFT should track contributions to the Zodiac ecosystem over time. The current proposed method for doing this involves two metrics:

Visualizing XP grants increasing Portal Item Level and Account XP

Visualizing transfer behavior of Portal NFT

samepant commented 2 years ago

@nginnever made headway on the XP and ILvl system here.

I'm new to solidity so these questions are pretty uninformed — 

I also want to make sure it is flexible enough to handle these use cases:

nginnever commented 2 years ago

Thanks for having a look, this is all just how this currently works and if there are other ideas I can switch things up.

Is there a way in Forge.sol to query an Account's current XP level?

The account XP state is stored by Forge.sol so it has access to this. The XP then determines how high of an item level an account is able to assign to a portal NFT. The NFT contract can then read the item level from the forge to select which SVG to render.

Is XP mapped to an NFT token Id or an NFT holder's address?

Account address. I had accidentally mapped this to int but that was not correct, this is fixed now. So we have the following.

Address -> XP score
XP - > Increases iLvl

XP does not transfer with an NFT

XP is forever bound to an account and has no transfer functionality (aside from selling the private key of an account or using a wrapper contract and selling ownership of that.)

XP should not be able to upgrade multiple NFT's ILvl

Thanks for bringing this requirement up, i did not think about this. I will add some code to make iLvl upgrade "redeem" XP for an account, this will likely require tracking a struct with more state about how much XP an account has claimed.

XP should be able to be decreased by the contract Owner

This is handled, the owner sets the XP and can set the XP lower if desired by a DAO.

auryn-macmillan commented 2 years ago

Lisa now has no NFT, but still has edit rights for zodiac.wiki.

My understanding of this is that Lisa loses her edit rights until they equip another portal. One must have both an equipped portal and enough XP to gain edit rights.

Everything else aligns with my understanding of what we've previously discussed.

cristovaoth commented 2 years ago

Several questions:

  1. Do we wanna make level up thresholds static? Right now they are 1000, 5000 and 10000. Would it make sense to let owner redefine them? I guess in case of governance changes we could later redeploy a new forge and swap it at wand level.
  2. What is the role of maxLevel? This doesn't seem to be used
  3. @samepant how many levels can our wand render? The current logic encoded by the Forge has no ceiling. It will upgrade the level, as long as unassigned XP are available. Maybe maxLevel was to be used here?
samepant commented 2 years ago

My understanding of this is that Lisa loses her edit rights until they equip another portal. One must have both an equipped portal and enough XP to gain edit rights.

Ah ok, that makes sense. Should we have a public function that returns a Boolean for whether or not an account has access to Zodiac resources? or should this be handled by a subgraph / application logic

Do we wanna make level up thresholds static? Right now they are 1000, 5000 and 10000. Would it make sense to let owner redefine them?

I think making the thresholds settable by the Owner makes sense. Although I'm not sure what should happen to existing wand levels if the thresholds are raised.

What is the role of maxLevel? @samepant how many levels can our wand render? The current logic encoded by the Forge has no ceiling. It will upgrade the level, as long as unassigned XP are available. Maybe maxLevel was to be used here?

We currently have designs for 5 levels, although I can see this changing in the future. I think using the maxLevel to limit how high the level can go makes sense. Then if/when we add more levels we can increase maxLevel in the future.

eccogrinder commented 2 years ago

Looking great. Just a few things:

  1. Auryn's point doesn't seem to be reflected in the graphic (and in the XP language). Currently, the bottom-left purple blob indicates that the account can participate in governance without holding a wand.

Requiring that accounts have both means the wand would act as an XP charger and for governance rights, and selling the wand means choosing to no longer participate in Zodiac governance (until they get a new wand). One thing about this: if the Wands became valuable, people would face the decision whether to continue participating in Zodiac governance or make a buck, a case in which high XP folks (i.e., active participants in the Zodiac ecosystem) may be unintentionally incentivized to not participate in Zodiac.

If the XP itself, on the other hand, does allow governance participation without holding a wand, then I think we'd need to make sure that lower-level XP accounts can't have a huge impact on governance, otherwise a gaming element could come into play.

  1. This point isn't about the mechanics, but just so we're on the same page: "edit rights" is more like "admin rights" and language like "edit zodiac.wiki" is more like "steward zodiac.wiki."

  2. Have we thought about how this would work with a multisig?

nginnever commented 2 years ago

Do we wanna make level up thresholds static? Right now they are 1000, 5000 and 10000. Would it make sense to let owner redefine them? I guess in case of governance changes we could later redeploy a new forge and swap it at wand level.

I was thinking we could make the thresholds permissioned variables, as long as we maintain an API that returns 5 ints for the NFT contract to read as the selector for SVG components, I think this will work.

@samepant how many levels can our wand render? The current logic encoded by the Forge has no ceiling. It will upgrade the level, as long as unassigned XP are available. Maybe maxLevel was to be used here?

Right as Sam mentioned, i think we might just need it if we are making adjustable limits in the XP. But it may be unnecessary, will experiment.

Should we have a public function that returns a Boolean for whether or not an account has access to Zodiac resources? or should this be handled by a subgraph / application logic

if we just need to know a balanceOf() >= 1 app logic / subgraph should work.