Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

On Chain DAO exp Mint & Faucet #34

Closed
Reecepbcups opened this issue Mar 8, 2022 · 5 comments
Closed

On Chain DAO exp Mint & Faucet #34

Reecepbcups opened this issue Mar 8, 2022 · 5 comments

Comments

@Reecepbcups
Copy link
Contributor

Reecepbcups commented Mar 8, 2022

Problem:

We need a way for someone to make a Proposal, which when passed allows for the wallet to swap an IBC asset for our minted EXP.

  • This EXP is not transferable to other accounts, but only minted and burned via some Transactions we define.
  • This EXPs value is derived from its (Net Asset Value / Total EXP Outstanding). [So if the account holds 1000UST, and 500EXP are in supply, the mint rate is 2UST->1EXP {1000UST/500 = 2}]
  • In the future we want to allow other assets such as ATOM, OSMO, etc. to be used if possible

Toms Document:

https://github.com/notional-labs/craft/blob/master/boring.pdf

FLOW CHART

https://www.canva.com/design/DAE6agPTlL4/CW5CTBuBsVGAvsQCoYcF4w/view?utm_content=DAE6agPTlL4&utm_campaign=designshare&utm_medium=link&utm_source=publishsharelink

Modified Requirements:

struct RequestExpMint: 
- string walletToBeWhitelisted      
- int    maxMintableExp              (max number of exp they can mint, regardless of price)
- string closeMintDate               (After pass, ISO 8601 format for when they can no longer mint EXP from this proposal)
- string vestingPeriodEnd            (mint tokens to account with "forever vesting"-- using cosmos sdk messages (gov v1beta2), then when this period ends the user can BURN their EXP to get UST/IBC assets back after 28 day burn period)

Python Rough Example: https://gist.github.com/Reecepbcups/4bdc9c5df2f4c366b47a7be1ebb5e378.
(Just Assume held_assets in the DAO are IBC enabled and could be held in a module wallet / sub account with authz or something)

Example:

craft11111 creates a Text Proposal with the following values

"title": "Requesting EXP to contribute to the CRAFT DAO",
"description": "what I can contribute here, why I should be accepted plz"
"walletToBeWhitelisted": "craft10r39fueph9fq7a6lgswu4zdsg8t3gxlqd6lnf0", 
"maxExpMint": 10000,
"closeMintDate": "2022-08-15T12:00:00Z",
"vestingPeriodEnd": "2030-01-01T00:00:00Z",

Title and Description just give the voters information on why they should vote yet to allow them into the DAO
walletToBeWhitelisted: is a CRAFT wallet which will be given the EXP asset in echange for UST / IBC assets
maxExpMint: is the max amount of EXP token a user can mint (ex. 1UST -> 1EXP)
closeMintDate: deadline for when they can no longer mint new EXP

IF the dao votes on this and it passes (PROPOSAL_STATUS_PASSED), their address craft11111 is now whitelisted So they can now mintExp via some Tx we create

They now can mint 100EXP for 100UST assuming EXP is $1 per coin.

  • These EXP are locked in their account & can not be sent to another address. They can only be Staked,Vote, & Burned (reverse swap, future feature)

if "closeMintDate" passes, craft11111 can no longer mint EXP bc the date passed
if user has minted "maxExpMint", they can no longer mint any more bc that was their limit

Faucet

  • For in game rewards, we need a way to send tokens from chain -> a wallet.

This will be firewalled so only the DAO's servers (minecraft & webapp) can make request.

  • Provided a server is compromised, the wallet/moduleAccount holding the tokens can only hold/mint a select amount daily, thereby reducing the impact on the chain

Example:

  • User A completes an in game task. When they do this, we make a request to the blockchain asking for 5craft tokens. like:
    https://faucet-craft.notional.ventures:4500/craft10r39fueph9fq7a6lgswu4zdsg8t3gxlqd6lnf0/5craft
    OR
    pass through JSON to 4500 port
    { "address": "craft10r39fueph9fq7a6lgswu4zdsg8t3gxlqd6lnf0", "coins": [ "5craft" ]}";

      NOTE: This endpoint https://faucet-craft.notional.ventures:4500 we would whitelist with iptables on the machine so ONLY our servers can access this port.
      The faucet account would have a limited amount of coins on it, so any breach would be limited if our webapp / minecraft servers were taken over.
    

Integration Code which did this on a x.45 chain:

https://github.com/notional-labs/craft/blob/master/minecraft-integration/craft-integration/src/main/java/com/crafteconomy/blockchain/core/request/BlockchainRequest.java#L73

@Reecepbcups
Copy link
Contributor Author

change mint to be asset (ex. atom) for exp @ rate

5x atom @ $30 = 1000EXP

  • when a proposal passes, we allow the mint exp to mint max that amount on top of now

@Reecepbcups Reecepbcups changed the title UPDATED - DAO exp Mint & Faucet On Chain DAO exp Mint & Faucet - tom doesn't like Mar 11, 2022
@faddat
Copy link
Contributor

faddat commented Mar 12, 2022

hey, spoke with Tom on all this briefly today. Let's cvall asap

@faddat faddat changed the title On Chain DAO exp Mint & Faucet - tom doesn't like On Chain DAO exp Mint & Faucet Mar 20, 2022
@faddat
Copy link
Contributor

faddat commented Mar 20, 2022

My opinion on this is that we should ship the test net and then figure out the correct way to handle this. Having a whitelisted IP address that can mint craft or EXP, it's just a Bridge too far in my opinion.

@vuong177
Copy link
Contributor

#92

@Reecepbcups
Copy link
Contributor Author

We are/have followed #32 instead of this, closing

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants