Mecenate v2.0.0
Last updated
Last updated
We are thrilled to announce version 2 of Mecenate with the following enhancements:
enjoy the beta on : https://mecenate.vercel.app/ Join the beta tester here: https://backdropbeta.com/mecenate-monorepo/join/I4mh3AZL
Documentation: https://scobru.gitbook.io/mecenatedocs/
Mecenate is a protocol composed by a set of smart contracts that assicure the user's privacy and the integrity of the data. The protocol would to be open source and decentralized. All the fees are distributed to the Mecenate users.
Mecenate consists of several applications, including:
📄Mecenate Feed: Mecenate Feeds Mecenate Feeds allows anyone to publish data and stake capital behind the accuracy of that information. Users can build a verifiable track record and stake their predictions with ETH. By staking ETH, the seller of a prediction puts value at risk if the prediction goes wrong. When a seller stakes behind their prediction they choose a "griefing factor". Griefing factor = degree (e.g. 1:10) to which the buyer is able to destroy their stake. If the seller stakes ETH, the buyer can destroy both their stakes for ETH .
📣Mecenate Bay: A marketplace build on top of Mecenate Feeds for sourcing ANY kind of information (secrets, predictions etc). Requests for information are matched with a stake by "fulfillers" who get paid if the information meets the set parameters. ETH is used for staking. Ethers from punished fulfillers are sent to the Mecenate treasury and distributed between users protocol.
QUESTION Enter a short explanation of what you're looking for. This can include links, Twitter handles and hastags. Make your descriptions as clear as possible.
REWARD An amount of ETH cryptocurrency you are locking up as a reward. This will be transferred into an escrow when you make the request, you make sure you have this in your wallet. Like this fulfillers can see you really have the money and will take your request seriously. (Once someone fulfills your request it is added to their stake and you will not get it back, you can only punish it.)
FULLFILLER stake This is what makes Mecenate Bay powerful. This is how much ETH cryptocurrency someone will need to deposit when fulfilling your request. You can destroy a fraction or all of their staked money if you are dissatisfied with what they provide. This will stop people responding with spam or bad information. It usually makes sense to have this be roughly 10% - 50% of the reward.
PUNISH RATIO How many ETH it will cost you to destroy one dollar of the fulfiller's stake. For example; if you set the ratio to 0.1 and punish a fulfiller who staked 100 ETH, it will cost you 10 ETH to destroy their entire stake. This protects the fulfiller from reckless punishment. The default value is good for most requests.
PUNISH PERIOD How many days after your request is fulfilled you have to verify the quality of the information provided. Within this window, you may punish the fulfiller. After this time their stake and reward are released. You may decide to release it early if you are satisfied with the submission. The default value is good for most requests.
Initial Connection: New user connects to MecenateClient
or MecenateUI
.
Key Generation: MecenateClient
generates asymmetric encryption keys PubKey, PrivKey
.
Identity Verification: User verifies their identity through Sismo zk-proof.
Key Storage: User sign a tx to create his unique Key Pair stored encrypted on IPFS.
Registration: MecenateClient
calls registerUser(evmAccount, vaultID, pubKey)
.
Feed Creation: Seller creates a Feed using Feed_Factory.buildFeed()
.
Data Upload: Seller uploads rawdata
to MecenateClient_Seller
.
Symmetric Key: MecenateClient_Seller
generates symmetric encryption key SymKey
.
Data Encryption: MecenateClient_Seller
computes encryptedData = SymKey.encrypt(rawdata)
.
Hash Computations:
keyhash = sha256(SymKey)
datahash = sha256(rawdata)
encryptedDatahash = sha256(encryptedData)
JSON and Proof:
json_proofhash_v120 = JSON(address_seller, multihashformat(datahash), multihashformat(keyhash), multihashformat(encryptedDatahash))
proofhash = sha256(json_proofhash_v120)
Blockchain Interaction:
Submits proofhash
to their Feed contract
Uploads json_proofhash_v120
to IPFS at multihashformat(proofhash)
Uploads encryptedData
to IPFS at multihashformat(encryptedDatahash)
Post Submission: Creates a Post using Feed.submitHash(proofhash)
.
Payment: Buyer deposits the required payment using Feed.accept()
.
Key Retrieval: MecenateClient_Seller
retrieves PubKey_Buyer
from Mecenate_Users
contract.
Encryption: MecenateClient_Seller
computes encryptedSymKey_Buyer = PubKey_Buyer.encrypt(SymKey)
.
Sell Data:
json_selldata_v120 = JSON(encryptedSymKey_Buyer, multihashformat(proofhash))
Uploads json_selldata_v120
to IPFS at multihashformat(sha256(json_selldata_v120))
Submission: Submits json_selldata_v120
to buyer using Feed.submitHash(multihashformat(sha256(json_selldata_v120)))
.
SymKey Upload: MecenateClient_Seller
uploads SymKey
to IPFS at multihashformat(keyhash)
.
Raw Data Upload: MecenateClient_Seller
uploads rawdata
to IPFS at multihashformat(datahash)
.
Set the transaction: The user selects the recipient and the amount to send. The recipient must be registered to the protocol.
Stealth Address Generation: The user generates a Stealth_Address
derived from the PubKey_Receiver
fetched from the MecenateUser
contract, and a random_string
SubmitHash: The user encrypts the random_string
with the PubKey_Receiver
, generate the json_payData_v100 and uploads it to IPFS:
After upload we get an ipfs_hash
. User Encode paramaters into a encoded
structure like this:
Subsequently, the user will call submitHash(encoded)
to store this information in the MecenateSend contract. 4. Send funds to stealth Address: MecenateSend
sends the funds to the Stealth_Address
generated by the user, and stores in a mapping the encoded
corresponding to the PubKey_Receiver
.
Select the receiver: The user selects a Receiver_Address
for their withdrawal and calls the getHash()
function to check if there are encoded
data associated with their PubKey_Receiver
.
Decrypt and generate the PK: If the encrypted data exists, the user decrypts it, obtaining the random_string
that multiplies by their PubKey_Receiver
, thus obtaining the Stealth_Address_PrivateKey
of the Stealth_Address
.
Withdraw: Having Stealth_Address_PrivateKey
, the user sends the funds from the frontend to the Receiver_Address
selected at the beginning.
This standard outlines how to encode data for transfering access to an mecenate data proof. Transfering access occurs when the creator of the proof allows an other party to access the data.
more infos here
packages/nextjs - package for the UI build in nextJS
packages/hardhat - package with smart contracts build with Hardhat
packages/client - SDK and command line interface, usefull to interact with the protocol.
Clone this repo & install dependencies
Example .env file for Base Goerli
On a third terminal, start your NextJS app:
Other developers who share a passion for decentralized data exchange are invited to join this project and help it reach its full potential. Thank you for taking the time to read about Mecenate, and we look forward to sharing more updates soon.