Phar-Out NFT Marketplace

Pharout Labs
7 min readApr 13, 2022

Last week I introduced the background and brief overview of our PharOut Market & Media platform, see here: https://medium.com/@pharoutlabs/welcome-to-a-new-era-of-phreedom-894f6a4987b2 .

This is a new experiment in self- governance and decentralized/distributed media & finance!

It started with Open Sea banning the CryptoPhunks from global trade between free people of a decentralized asset!

The “Phunks” weren’t the first NFT project to receive a DMCA and subsequently removed from OS, but they had a significant cultural characteristic of punk rebellion that resonated with OG crypto enthusiast and various sympathizers who understood the importance of open and free trade in this time and age.

I, PhunkyJON saw the need for open and free trade of decentralized assets and began the work on early research studies and preparations for a fully distributed and decentralized NFT marketplace in August of 2021. This began a half year journey spending 18–20 hrs a day on research and assembling of the Phar-Out market. I am no stranger to tyranny and centralized levels of corruption and control, I spent most of my life researching, writing and combatting government corruption in the courts and various venues of public discourse. I was eventually threatened with duress and coercion in order to live a free man and see my family if I didn’t drop some high profile complaints i filed in a court of record. My legal path was thrown off but I didn’t stay silent long and come Covid, my life turned upside down. I moved out of my home state after many things went sour with nothing but my car, camping gear, dogs and a little under 10k in crypto trading on a few custom python algos I wrote that kept me going.

Night and day I built with a motivating drive like no other while enjoying the amazing great outdoors in State forests as I traveled south to Florida, but this wasn’t how it ended, this is where it all begins!

While running python data scraping algos on NFTs in late July for someone who hired me to build a custom NFT indexer, I came across the cryptophunks!

I am in love with coding and the whole concept of computer and data sciences! I was spending every waking hour perfecting my codebase and watching the linux server console log the fetched results which it was parsing through live block events. It was incredibly exhilarating to me to watch having built everything myself!

I researched what the cryptophunks were out of curiosity as was my usual habit while perusing the console because they weren’t from the regular wyvern contract, i think it was cargo at the time. I was half a month late to the DMCA party but understood the ethos immediately and bought Cryptophunk #9249 since it looked like me! Find more details on the history of the CryptoPhunks here https://discord.gg/nh3Sja5wH3!

My previous research in NFT marketplaces saw the need for a decentralized exchange, and I started the mission out of a desire for freedom.

The marketplace contracts went through many changes over the months as I built, and I assembled a concept(i will call it) and asked for review. One of the Phunks asked their friend @whalegoddess to check out what I had, and that began an amazing friendship and months of rigorous scrutiny, testing and re-assembling of the whole suite to where you see the current layout in the diagram below. I couldn’t have done this without their help and they’ve become a great friend and close trusted colleague in this greater Ethereum community!

Marketplace UML Diagram

I have spent countless sleepless nights and sometimes extended days without sleep, days of fasting and meditation, and consistent 18–20 hour waking days working on this project thus far, here is what I can share:

The PharOut Marketplace consists of 8 contracts and 4 proxy interfaces. The contracts are the Marketplace, Trades, Bids, Offers, RewardsController, OwnerProxy, RoleProvider and Mint. The proxy interfaces are IEscrow(for interacting with the Trades, Bids and Offers contracts.), INFTMarket, IRewardsController and IRoleProvider. It’s written in Solidity 0.8.7 with compartmentalized features to reduce access to assigned roles for safety.

The contracts are not ownable, they will be controlled by Open Zeppelin Access Control roles consisting of CONTRACT, DAO and DEV roles. The CONTRACT role allows for interoperability between the various contracts while excluding all others from accessing them. All contract calls that are not from the CONTRACT role must be handled through the OwnerProxy contract, which will execute the calls using the CONTRACT role if msg.sender has the required access role.

The DAO is restricted in access to only update the market-wide platform fee and update the tokens/amount used to redeem PharOut NFTs. The DEV role is restricted in access to only update new dev addresses to the claimable rewards array as new recruits are hired, to revoke DAO access upon insubordination(I will not tolerate corruption or negligence and I expect the same treatment)and to update the contract addresses for only 30 ether days after contract deployment. I built in a killswitch after 30 days that restricts all access from changing any of the contracts addresses which will allow for a window of upgradability and then afterwards an assurance of unstoppable, decentralized trading!

The contract functions are multi-dimensional arrays by default so that multiple orders can be executed at once. The testing costs for order execution has been relative to a Uniswap order execution +/-!

Once a user lists an item for sale, their address is checked to see how many they have listed and if they are a current Rewards user. If there are no items listed and they are not a Rewards user, they are created as one but ineligible to claim rewards until their first item listed sells. If an item listed sells while more than one item remain listed, they become eligible to receive rewards base upon a unique “claim clock” I invented.

The rewards clock is based on three epoch time periods, Alpha, Delta and Omega. The time epochs are set whenever a user calls the setClaimClock function, and each time period is rolled back in place, Alpha becomes the current block, Delta becomes Alpha, Omega becomes Delta.

2/3rds of all platform fees goes to active marketplace users!

If a users claim time period falls within the current Alpha time and they have not claimed, they can receive a full user rewards claim; if within Delta epoch and less than or equal to 1 claims, they can receive half a user rewards claim; if within Omega epoch and less than or equal to 2 claims, they can receive one third of a user rewards claim. Once another item they have listed sells, their claim clock epoch is refreshed.

These rewards will consist of Ethereum and any ERC20 tokens they would like to claim!

Decentralized ERC20 trading coming soon!

This allows up to six days of various rewards distributions to claim in an egalitarian fashion!

Any holder of a PharOut NFT will be able to claim a full user rewards once a day while also not having any marketplace trading fee! All of the proceeds raised during this time from minting PharOut NFTs will go towards reimbursing me and paying needed help and activities for the build, including all of the artwork and media created so far! After this time they will only be redeemable using PHNKUY tokens! Please consider minting one today https://kindly-care.surge.sh/#/market/mint and showing your support!

The controlling DAO receives 3/4 of the remaining 1/3 fees to be used for marketing, personnel hiring and various management services, while the DEVs receive 1/4.

Half of the dev allotment is set aside for the dev multi-sig to use for development purposes, while the other half is claimable by active PharOut devs! This will allow for quite a unique opportunity of a growing rewards ceiling for active developers who build and add value to the community, while also establishing a much needed dev’s treasury for project funding! Come join us today!

The contracts will be on mainnet Ethereum, and I will pursue multi-chain avenues in the future. Currently, the marketplace contracts have been deployed for testing on Rinkeby, the full subgraph is built and deployed and the UI/UX has been built and rigorously tested with many improvements happening daily! ERC20 offers, NFT trades, Market orders(listing/delisting/buying) and Ethereum Bids functions are all coded, enabled and tested many times.

I am still coding many more UI/UX improvements, transaction handlers, styling and solidifying our distributed database storage for decentralized NFT & ERC20 token metadata referencing! All tokens that pass through our exchange are externally queried for their data and then saved to our advance p2p cryptographic cyber-security network! This creates a distributed database of NFTs that anyone can have access to at any time by running their own node! I will setup Heroku deploy buttons for one-click deploys of pre-configured nodes for anyone to become an active supporter of our network!

I’ll have more on the database structure and our Media networking adventure next week!

Thanks for tuning in! Until next time, over and Phar Out!

--

--