✔️ Decentralized Anonymous Data Marketplace
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:
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.
MecenateClient
or MecenateUI
.MecenateClient
generates asymmetric encryption keys PubKey, PrivKey
.MecenateClient
calls registerUser(evmAccount, vaultID, pubKey)
.Feed_Factory.buildFeed()
.rawdata
to MecenateClient_Seller
.MecenateClient_Seller
generates symmetric encryption key SymKey
.MecenateClient_Seller
computes encryptedData = SymKey.encrypt(rawdata)
.keyhash = sha256(SymKey)
datahash = sha256(rawdata)
encryptedDatahash = sha256(encryptedData)
json_proofhash_v120 = JSON(address_seller, multihashformat(datahash), multihashformat(keyhash), multihashformat(encryptedDatahash))
proofhash = sha256(json_proofhash_v120)
proofhash
to their Feed contractjson_proofhash_v120
to IPFS at multihashformat(proofhash)
encryptedData
to IPFS at multihashformat(encryptedDatahash)
Feed.submitHash(proofhash)
.Feed.accept()
.MecenateClient_Seller
retrieves PubKey_Buyer
from Mecenate_Users
contract.MecenateClient_Seller
computes encryptedSymKey_Buyer = PubKey_Buyer.encrypt(SymKey)
.json_selldata_v120 = JSON(encryptedSymKey_Buyer, multihashformat(proofhash))
json_selldata_v120
to IPFS at multihashformat(sha256(json_selldata_v120))
json_selldata_v120
to buyer using Feed.submitHash(multihashformat(sha256(json_selldata_v120)))
.MecenateClient_Seller
uploads SymKey
to IPFS at multihashformat(keyhash)
.MecenateClient_Seller
uploads rawdata
to IPFS at multihashformat(datahash)
.Stealth_Address
derived from the PubKey_Receiver
fetched from the MecenateUser
contract, and a random_string
random_string
with the PubKey_Receiver
, generate the json_payData_v100 and uploads it to IPFS:const json_payData_v100 = {
encryptedR: `enrypted_random_string`
nonce: nonce,
ephemeralPubKey:`PubKey_Sender`
};
After upload we get an ipfs_hash
.
User Encode paramaters into a encoded
structure like this:
const encoded = ethers.utils.defaultAbiCoder.encode(
[
"bytes",
"bytes",
"address",
"address",
"uint256"
],
[
ipfsHash,
`ipfs_hash`
`PubKey_Receiver`,
`Stealth_Address`,
token_address,
amount_to_send
]);
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
.
Receiver_Address
for their withdrawal and calls the getHash()
function to check if there are encoded
data associated with their PubKey_Receiver
.random_string
that multiplies by their PubKey_Receiver
, thus obtaining the Stealth_Address_PrivateKey
of the Stealth_Address
.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.
Buffer(JSON.stringify({
msp_version: <v1.0.0>,
proofhash: <ipld_sha2_256 proof>,
sender: <0x1234...>,
senderPubKey: <0x1234...>,
senderVaultId: <0x1234...>,
receiver: <0x1234...>,
receiverPubKey: <0x1234...>,
receiverVaultId: <0x1234...>,
encryptedSymKey: ipld_sha2_256(Buffer(<raw data>))),
postId: <0x1234...>,
... <extra fields>
}))
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
git clone https://github.com/scobru/mecenate-monorepo.git
cd mecenate-monorepo
yarn
Example .env file for Base Goerli
NEXT_PUBLIC_NETWORK=baseGoerli
NEXT_PUBLIC_RPC_URL=https://goerli.base.org
NEXT_PUBLIC_CHAIN_ID=84531
NEXT_PUBLIC_RPC_POLLING_INTERVAL=5000
NEXT_PUBLIC_PINATA_API_KEY=
NEXT_PUBLIC_PINATA_API_SECRET=
NEXT_PUBLIC_PINATA_GATEWAY=
NEXT_PUBLIC_IGNORE_BUILD_ERROR=true
NEXT_PUBLIC_ALCHEMY_SECRET=
NEXT_PUBLIC_INFURA_API_KEY=
NEXT_PUBLIC_TELEGRAM_TOKEN=
NEXT_PUBLIC_DAI_ADDRESS_BASE="0x7B027042374F2002614A71e5FF2228B1c862B67b"
NEXT_PUBLIC_MUSE_ADDRESS_BASE="0x614cA0b2fFde43704BD122B732dAF9a2B953594d"
NEXT_PUBLIC_WETH_ADDRESS_BASE="0xa3a0460606Bb07A44Ff47fB90f2532F99de99534"
NEXT_PUBLIC_APP_KEY=""
NEXT_PUBLIC_DB_NAME=""
On a third terminal, start your NextJS app:
yarn start
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.