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
- NEW IN V2
- WHAT'S IS THIS?
- HOW IT WORKS?
- WORKFLOW FEEDS
- WORKFLOW SENDS
- STANDARDS
- PACKAGES
- QUICK START
- MecenateSend: New Layer that allow to send ETH or ERC20 with privacy.
- MecenateMarket: Allow all seller to post into a board the data that they want to sell public.
- Multi-Token Usage: Now supports ETH, DAI, and MUSE (the protocol token) as currencies for feeds.
- Security and Gas Fee Optimization: Improved security measures and optimized gas fees for better performance.
- Mecenate EAS Resolver Contract: Introduced the Mecenate EAS Resolver contract to ensure the attestations are genuinely valid.
- Attestation Mechanism: Implemented an attestation mechanism via eas during the post finalization stage. When the Buyer confirms the data validity, they also attest to the seller's reliability on-chain.
- MUSE Token Burning Mechanism: Implemented a mechanism for burning the native MUSE tokens to control the supply and increase scarcity.
- Uniswap Purchase and Burning: Enabled the purchase of native MUSE tokens on Uniswap using DAI and ETH, followed by a burning mechanism to further manage the token economics.
- Send section added in the UI
- Market section added in the UI
- Account Abstraction and Social Login: Implemented Account Abstraction and social login functionalities using Web3Auth.
- Sismo Implementation: Integrated Sismo to verify user identity via zkproof without requiring the user to provide any data to the platform.
- Payment with DAI: We add DAI as payment for feeds
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
orMecenateUI
. - Key Generation:
MecenateClient
generates asymmetric encryption keysPubKey, 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
callsregisterUser(evmAccount, vaultID, pubKey)
.
- Feed Creation: Seller creates a Feed using
Feed_Factory.buildFeed()
. - Data Upload: Seller uploads
rawdata
toMecenateClient_Seller
. - Symmetric Key:
MecenateClient_Seller
generates symmetric encryption keySymKey
. - Data Encryption:
MecenateClient_Seller
computesencryptedData = 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 atmultihashformat(proofhash)
- Uploads
encryptedData
to IPFS atmultihashformat(encryptedDatahash)
- Submits
- Post Submission: Creates a Post using
Feed.submitHash(proofhash)
.
- Payment: Buyer deposits the required payment using
Feed.accept()
. - Key Retrieval:
MecenateClient_Seller
retrievesPubKey_Buyer
fromMecenate_Users
contract. - Encryption:
MecenateClient_Seller
computesencryptedSymKey_Buyer = PubKey_Buyer.encrypt(SymKey)
. - Sell Data:
json_selldata_v120 = JSON(encryptedSymKey_Buyer, multihashformat(proofhash))
- Uploads
json_selldata_v120
to IPFS atmultihashformat(sha256(json_selldata_v120))
- Submission: Submits
json_selldata_v120
to buyer usingFeed.submitHash(multihashformat(sha256(json_selldata_v120)))
.
- SymKey Upload:
MecenateClient_Seller
uploadsSymKey
to IPFS atmultihashformat(keyhash)
. - Raw Data Upload:
MecenateClient_Seller
uploadsrawdata
to IPFS atmultihashformat(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 thePubKey_Receiver
fetched from theMecenateUser
contract, and arandom_string
- SubmitHash: The user encrypts the
random_string
with thePubKey_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
.
- Select the receiver: The user selects a
Receiver_Address
for their withdrawal and calls thegetHash()
function to check if there areencoded
data associated with theirPubKey_Receiver
. - Decrypt and generate the PK: If the encrypted data exists, the user decrypts it, obtaining the
random_string
that multiplies by theirPubKey_Receiver
, thus obtaining theStealth_Address_PrivateKey
of theStealth_Address
. - Withdraw: Having
Stealth_Address_PrivateKey
, the user sends the funds from the frontend to theReceiver_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.