Giveth / Roadmap

Open Roadmap Planning via Tokenlog
0 stars 1 forks source link

Build Contract Architecture #83

Open divine-comedian opened 1 year ago

divine-comedian commented 1 year ago

Current Proposed Implementation from spec: I would love some review from @KurtMerbeth @aminlatifi

Contract Architecture:

Create a deposit contract that receives GIV tokens and will manage the whitelist of eligible Giveth Pro projects- aliased by their project recipient address. Depositors are also allowed to withdraw their GIV from the contract at any time.

Variables:

Roles:

Potential problem

Only allowing one deposit per project could make it so that someone besides the project owner has control of the upgrade status.

Some changes proposed

Perhaps we can take a page out of @Griff Green ‘s suggestion of tokenizing giveth PRO eligibility.

If we use a simple ERC-1155 template (mint, burn, transfer) then would it be possible to alias a tokenID (for an NFT) to a projectID on Giveth??

We can create a nested mapping for each tokenID to the depositorAddress (the minter) with a subsequent mapping of the depositPrice which represents the upgradePrice at time of deposit. The NFT owner can burn their NFT and claim their depositPrice for a specific depositorAddress (if msg.sender === depositorAddress) back in GIV tokens

Multiple people can mint an NFT for a given projectID(TokenID) as long as each minter pays the current upgradePrice

we can make a transfer function that will also update the depositorAddress to the recipient of the NFT, effectively transferring ownership of the GIV denominated in depositPrice.

We can then check a given project’s eligibility by querying the balanceOf of a certain tokenID (project ID) - if the balanceOf is > 0 then we can consider at least one person has still deposited tokens on behalf of a given project