# Harby
Harby is a self-running and censorship-resistant [Harberger-taxed](https://medium.com/@simondlr/what-is-harberger-tax-where-does-the-blockchain-fit-in-1329046922c6) ad-network which distributes tax revenue to ad-space owners and network curators and active participants in a completely decentralized way.
## Premise
Problems:
- Current ad networks are monopolistic, predatory, and context-unaware
- RMRK Association has very few RMRK tokens
- There is very little utility for RMRK tokens
By leveraging blockchain and building a fully decentralized platform which accepts RMRK as payments for a globally sourced directory of advertisement positions on various blogs, publications, and similar media, the RMRK team can solve a big part of the RMRK token reclaim problem, add utility to the tokens, and simultaneously improve the ad landscape as a whole.
This network can then be further expanded to cater for in-metaverse billboards, in-real-life electronic displays, streaming services, and more.
### Terminology:
- ad-space owner: current owner of the ad NFT, able to change its content
- ad-space host: owner of media minting the ad-space NFT, and displaying its contents
#### Parameters
| Param | Default | Bounds | Governable |
| -------- | -------- | -------- | -- |
| `MINIMUM_PRICE` | 10 RMRK | `[5,+∞)` | Yes |
| `DEPOSIT_MULTIPLIER` | 3 | `[1,7]` | Yes |
| `COUNCIL_APPROVAL` | 3/4 | n/a | No |
| `COUNCIL_REJECTION` | 1/2 | n/a | No |
| `MINT_DEPOSIT_SLASH` | 20% | `[1,100]` | Yes |
| `COMMISSION` | 2% | `[1,50]` | Yes |
| `COUNCIL_SEATS` | 7 | `[5,7,9,11,13,15,17,19]` | Yes |
| `TAX` | 1% | `[1,20]` | Yes |
| `VOTE_LENGTH` | 3 | `[1,7]` | Yes |
| `COUNCIL_DEPOSIT` | 100 | `[10,+∞)` | Yes |
## Implementation
Harby is intended for launch on Moonriver.
Harby allows websites (_ad-space hosts_) to submit their ad-space to a decentralized front end UI by providing dimensions, filetype limits and requirements, terms and conditions, and other parameters. This triggers a smart contract which mints a RMRK2.0 NFT for them with the appropriate metadata. The initial price is set by the platform to `MINIMUM_PRICE`.
Having an ad-space minted requires a RMRK deposit in the size of `DEPOSIT_MULTIPLIER` times `MINIMUM_PRICE`.
> Example: Alice owns MySite.com and wants to run an ad on it. The minimum price is set to 15 $RMRK, the multiplier is set to 3. She submits a request to Harby's UI, depositing 45 $RMRK.
The request enters an approval queue. A token-elected set of `COUNCIL_SEATS`, who cannot vote for themselves but only vote with their own RMRK balance (preventing effective Sybil-self-vote), are then responsible for voting on the newly submitted ad spaces.
> Note: the voting power of a single Council member is always bound to the number of tokens in their wallet, and the number of tokens that elected them does not matter. This is a system that is plutocratic in voting power, but democratic in election.
The voting process lasts for `VOTE_LENGTH` days. Voting on a proposal locks a Council member's RMRK tokens for `VOTE_LENGTH` days.
> Note: Durations do not stack - a lock that's 3 days into a 7 day lock will be extended to 7 days if a new vote is issued, not to 4+7.
If 70% or more of this Council approves an ad-slot, it is minted and put up for sale. If the slot is rejected by more than 50% of the council, the deposit is slashed by `MINT_DEPOSIT_SLASH`. The slashed amount goes to Harby Treasury. If `VOTE_LENGTH` days elapse without either outcome, the deposit is refunded and the vote canceled.
> Why would Councilors ever approve an ad when rejecting leads to payout via Treasury? If they reject everything, they will never earn anything as people will stop using the platform. Likewise, the long term gains from having active ads in the system earns them much more.
Every ad-space, whether it's on Coinmarketcap or an obscure blog, costs the same in the beginning - the default price is the minimum. On purchase, the buyer can set the price, as long as it is above the minimum.
At the same time, the buyer must also pay the first week of Harberger Tax, calculated as 1% of the purchase price. The first purchase of the ad-space is split 50/50 between Harby Treasury and the ad-space host. The ad-space host will continue to earn income from tax.
The buyer **must** also deposit an equal amount (equal to purchase price) of RMRK tokens into the Harby lock contract which stays locked for the duration of the buyer's ownership of the ad-space. This disincentivizes abuse by the ad-space owner.
> Example: Alice's ad-space costs 15 RMRK when minted and approved by Council, and Bob decides he values this at 100 RMRK. He will immediately pay 101 RMRK and be guaranteed ownership for this week. **The initial sale is split between Harby treasury and ad-space seller**, so Alice gets 51 RMRK, and Harby gets 50 RMRK. He will also need to lock 100 RMRK tokens for the duration of his ownership of the ad-space.
>
> If Bob wishes to keep it longer, he can choose to pre-pay into the future. In this case, that's 1 RMRK per additional week + 2% in commission for Harby, coming out to 1.02 RMRK per week. Bob also needs to put down a deposit in the size of the purchase price. This is refunded when he loses ownership, unless he is penalized (see Penalties below).
This tax is paid to the ad-space host.
At any point during an ad-space being owned by someone, anyone else can purchase it for 10% on top of the purchase price, and put down a deposit in the same amount. On ownership change, the previous owner gets his original purchase deposit back.
> Suppose Charlie decides that he wants Alice's ad space now. He can pay 110 RMRK to Bob plus 2% commission to Harby treasury, and needs to pay the first week of Harb tax on top: total 113.1 RMRK (`110 + 110*1% + 110*2%`). He also needs to put an extra 110 RMRK into Harby's contract to lock them as a deposit.
If Bob had pre-paid tax into Charlie's ownership duration, this pre-paid tax is refunded automatically on ownership transfer.
Should a new tax period begin without adequate pre-payment having been submitted by the current owner, the ownership automatically reverts to Harby, and the price automatically becomes the current `MINIMUM_PRICE` again.
> Note: Changes in `MINIMUM_PRICE` or `DEPOSIT_MULTIPLIER` do not apply retroactively to an existing deposit - if an ad was minted with a deposit of 30 RMRK initially, a change to `MINIMUM_PRICE` = 25 and `DEPOSIT_MULTIPLIER` = 7 will not affect the existing ad's deposit - it remains perfectly valid. However, if an ownership revert happens due to unpaid tax, the new price will now be 25, not whatever it was when it was first minted.
### Setting Ads
The Harby website will provide an embeddable widget which can be easily pasted into websites and other media. This widget will automatically render the current owner's submitted ad.
The owner submits an ad into the ad space by minting an NFT in the dimension matching the ad-space, sending it into the ad-space NFT, and equipping it. This is done through a simple UI.
Think of it like using a big public billboard which is empty at first, but then you come in with a few dozen rolls of sticky ads and plaster them over the surface.
The next owner can re-plaster over this ad and put their own up there, and so on.
### Penalties
#### Penalizing Hosts
An **ad-space owner** can, at any point, report an ad-space host for bad behavior. This can be any of:
- downtime
- hiding the ad
- changing the ad and replacing it with something they got paid a fixed price for outside of Harby
To make this report, a user needs to put down a deposit of `MINIMUM_PRICE`. The report's body is stored on IPFS and fetched on demand. This report can be reviewed by Councilors.
If `COUNCIL_APPROVAL` or more of the Council decides that an ad-space host has breached the T&C, their deposit is slashed with 75% going to Harby Treasury, 25% going to the ad-space owner who was damaged by this. The ad-space NFT is destroyed.
If `COUNCIL_REJECTION` or more of the Council decides that the report is invalid, or if `VOTE_LENGTH` days expire, the reporter is slashed with 100% going to Harby Treasury.
#### Penalizing Owners
An **ad-space host** (ad-space issuer) can, at any point, report an ad-space owner for bad behavior. This can be any of:
- hosting material that does not match the host's T&C
To make this report, a user needs to put down a deposit of `MINIMUM_PRICE`. The report's body is stored on IPFS and fetched on demand. This report can be reviewed by Councilors. **A reported ad-space NFT immediately stops showing content on the embedded website.**
If `COUNCIL_APPROVAL` or more of the Council decides that an ad-space owner has breached the T&C of a hosting website, the purchase deposit is slashed with 90% going to Harby Treasury and 10% going to the ad-space host. The ad-space NFT's ownership defaults to newly-minted state.
If `COUNCIL_REJECTION` or more of the Council decides that the report is invalid, or if `VOTE_LENGTH` days expire, the reporter is slashed with 100% going to Harby Treasury.
### Harby Treasury
The Harby Treasury distributes its holdings on-demand (anyone can trigger the distro and pay the tx fee):
- 30% to Council members depending on the ratio of expected vs executed votes. Participate less = earn less
- 39% to RMRK team's multi-sig
- 1% to all governance and council voters in accordance with their previous on-chain performance and measurable reputation (previous votes, number of votes out of available votes, etc.)
- 20% to Harby's ongoing maintenance budget, a separate multi-sig controlled by Council members that can disperse funds as grants and payments for maintenance
- 10% to Council voters, distributed relative to number of tokens they voted with
## Council
Anyone with a RMRK balance over `COUNCIL_DEPOSIT` can apply to be on the Council. Other RMRK holders can then vote for applicants by assigning weight to different candidates where total of all weights is equal to or less than the voter's balance of RMRK.
A vote will not lock the tokens, but if the token balance in a given account changes to less than the balance on vote time, the votes are reset and canceled.
The Council structure is recalculated every `VOTE_LENGTH` days. On every Council restructure a payout is automatically executed in order to start the new team with a clean balance.
> Note: Possible problems that need game theory considerations include vote buying and Sybil voting. Possible solutions to Sybil voting include adding weights to voters based on their on-chain performance (reputation) and applying quadratic voting to the sum of votes.
## Governance
Anyone with over 1000 RMRK can propose a change to the Harby protocol. The change can be a modification of one or multiple parameters (see table at the top of this post).
All RMRK holders are eligible for voting. Voting locks the RMRK tokens for `VOTE_LENGTH*2` period of time.
Changes are auto-enacted when possible (parameter changes), or delegated to Council's manual intervention when not (i.e. proposing a funding of a Harby related tool).
The more votes an account executed, the more powerful their voting multiplier. The formula for voting powerup based on performance is yet to be decided.
The incentive for voters is the 1% treasury distribution distributed to all active and regular voters.
## Problems and Addons
Apart from the minimalistic implementation above, the following needs to be considered.
### Reliability Curation
- Reviews for reliability of adspace sellers. Could be done in partnership with a blockchain-based review platform.
### Content Rotation
- Multi-ownership or some solution for ad rotation. As owners change, it might be good to purge existing resources and allow a blank slate. That way, an owner can submit several ads as resources into the ad-space NFT and the website widget could auto-iterate throught them without needing to issue resource priority change transactions.
## FAQ
- can a new owner set the price below the minimum?
- Not right now, but this is something we could consider adding for low-budget sites or low-standard countries, as even 10 RMRK might be prohibitive. Additionally, we could consider removing the minimum price param or lowering it drastically, and introducing a minimum deposit instead of deposit multiplier.
- if an ad-space owner pre-pays for several tax weeks but decides to back out mid-way through his term, can he?
- No, owners should be aware of what they're buying and plan accordingly. We're counting on ad-space owners' conscious thinking about outreach.
- what about NSWF / offensive content
- Harby does not care about content. If an ad-space owner breaches the T&C of a target website by publishing content that's not supposed to be there, the ad-space host can submit a report about this user, at which point the Council can act. Having a pending report about any ad-space owner immediately stops showing their ad in the website loading it.
## Pilots
Pilots such as Polkawarriors with Dotmarketcap, Polkadot.com's Dot Leap, and other have already expressed interest in test-driving this.