In the Ocean Protocol <> Gitcoin ODC Hackathon, contestants are incentivised to use Ocean's technology to find insightful anti-Sybil algorithms and to package anti-Sybil algorithms into composable legos with a fully decentrealised approach.
- Kickoff: Jan 5th, 2023
- Submission deadline: Tuesday Jan 31st, 2023 at 23:59 UTC
- Total Prize pool: $40,000 in bounties
This readme describes 2 different ways that participants can use to get free bonus points during the hackathon:
- Publish your algorithms as ERC721 using the Ocean Market frontend
- Use Ocean Data NFTs as ERC725Y via Ocean.py or Ocean.js
Ocean Market provides a convenient interface for individuals and organizations to publish their data. Data assets can be datasets, algorithms,images, location information, audio, video, sales data, or combinations of all!
To publish on the Ocean Marketplace, you must first get MATIC or ETH to pay for gas fees, and host your assets on a decentralized storage like Arweave. To host your data assets on Arweave you have two options, A and B.
Option A: Webapp, using arweave.app For more info, access the Ocean Docs
Option B: In code, using pybundlr library
Once the above is completed, take the transaction ID and head over to Ocean Market to get started with publishing. If you need more information feel free to ask for support in our dedicated Discord channel or visit our docs.
The ERC725y feature enables the NFT owner to input and update information in a key-value store. These values can be viewed externally by anyone and are highly useful building blocks for various Sybil protection approaches. As an example, users can use Ocean data NFTs to Login with Web3 and allow a dApp to not only connect to the user's wallet, but also access profile data that the user has privately shared to it. Interestingly, these Ocean data NFTs are also essentially Soulbound Tokens as well.
Before getting started, ensure that you've already installed Ocean.py and set it up remotely
In Python console:
from ocean_lib.models.arguments import DataNFTArguments
data_nft = ocean.data_nft_factory.create(DataNFTArguments('NFT1', 'NFT1'), alice)
# Key-value pair
key = "fav_color"
value = b"blue"
# prep key for setter
from web3.main import Web3
key_hash = Web3.keccak(text=key) # Contract/ERC725 requires keccak256 hash
# set
data_nft.setNewData(key_hash, value, {"from": alice})
value2_hex = data_nft.getData(key_hash)
value2 = value2_hex.decode('ascii')
print(f"Found that {key} = {value2}")
That's it! All data was stored and retrieved from on-chain without using Ocean Provider or Ocean Aquarius (though the latter can help for fast querying & retrieval).
This way, we can also encrypt the data. Under the hood, it uses ERC725, which augments ERC721 with a well-defined way to set and get key-value pairs.
If you need more information about Ocean ERC725y feel free to ask for support in our dedicated Discord channel. Alternatively, you can visit the full README or our docs.
Before getting started, ensure that you've already installed Ocean.js.
Using Ocean Data NFTs as ERC725Y via Ocean.js can be helpful for dApp developers, particularly if you have prior experience with javascript.
The process involves creating a Data NFT (which represents the base-IP on-chain) and a datatoken (which will be used to purchase the dataset). Access the full README to get started.
If you need more information about Ocean ERC725y feel free to ask for support in our dedicated Discord channel or visit our docs.