# Gliss Protocol yellowpaper. Gliss protocol tokenises attention (like BAT) and influence in social media. In doing so, we build a platform where it is possible to get financial exposure to a profile's growth in influence - a fame derivative, which is used to incentivise the network to self-discover and fund early and unknown artists. ## 0. Origins. Introducing the follower derivative: > Maybe one idea for this is something like a derivative instrument based on the number of followers. You buy a derivative which goes up in value according to how many followers a user has. > > But what would this derivative be able to be exchanged for? > > Say everyone’s social feed had a token which represented their attention. So you could buy a person’s attention token and use it to pay for ads in their feed. > > Now say that when you follow someone, you actually start streaming your attention token to them - ie. if I follow stani, he gets this token which can be used to advertise in my feed. > > Conceptually this is similar to how Twitter works already. When you follow someone, they come up in the feed. But now the information market is explicit - and you can build interesting things on top. > > What if you could sell your future fame (aka a follower derivative) upfront by selling a token which represents the collective adspace in your follower’s feeds? If your follower count goes up, early speculators get rich on having your token, which is now valuable because it can be used to advertise to your fans. > > And so then you can incentivise curators! Because by building a way to get exposed to a follower count, you create a way to profit when it goes up - which ultimately you might do since you’re sharing/mirroring and trying to boost this creator ## 1. Introduction. ### 1.1. Rebuilding the feed as a marketplace for attention. At its core, the feed is an attention marketplace. We pay attention to our followers. That token can be used to buy attention from us. How is ATTENTION distributed? ATTENTION is an inflationary token which is continually minted for every user. All ATTENTION follows the same fixed inflation rate. When a user follows a profile, they allocate a portion of their ATTENTION inflation to that profile, which is streamed (using the same tech as yield farming - Superfluid streams). Recap: When a user follows a profile, they receive a continuous allocation of ATTENTION from you. Every user's feed is generated from a mixture of posts from their followers, and a % of posts that are allocated by the **Attention Market Maker**. Users get paid for their attention, which is starkly different to Web 2, where the profits of advertising and engagement are kept by the platform. Why a %, why not the entire feed allocated by the market? We call this the "risk on" scenario. The % of the feed which can be bought is a parameter of our design - called the **"risk factor"** - and what's more, it is able to be tuned by the users of the network itself. This creates an interesting dynamic - the social network can collectively grow in revenue with more market-allocated feed content, but the experience could become worse. Allowing this value to be governed puts this decision in the hands of who it affects. #### Attention Market Maker The feed algorithm aims to achieve these purposes: 1. A % of the feed can consist of ads. 2. The feed is ALWAYS listed chronologically. This differs to other feeds. Usually ads are interspersed, and can repeat. We don't want this to happen. We want posts from followers and posts from non-followers to be equal. We implement the feed algorithm quite simply: ``` items = [ ...posts_from_followers, ...ads ] feed = items.sort(chronologically) ``` So how do we implement the attention market to effectively allocate ads within the requirements of the feed? A naive design for this attention market is quite simple: - say the feed is divided into fixed size intervals, like 1h chunks. - the constraint is that only X% of a chunk can contain ads. - and for pricing, we'll set it to a fixed fee in $ATTN. Let's design an example of a market where there can only be 5 ads per 1h interval: ```solidity= contract AttentionMarketplace: function make_bid(market, ad_publication, bid, expiry): max_ads_per_interval = 5 ads_in_current_interval = len(ads.filter(past hour)) if (ads_in_current_interval + 1 < max_ads_per_interval) { emit Bid(market, ad_publication, bid, expiry); } ``` This is great, but it has a flaw. What happens when no-one has posted that hour? Our feed could become _just_ ads! We explicitly (see #2) don't want this. How can we solve this? Well what if we factored in the rate of posts for that interval? We could determine a maximum number of ads per interval - if there aren't enough posts, then there would be no ad slots allowed. Setting the ads to 10% of the feed, then for every 9 posts, 1 ad slot would be allocated. ```python= # Our invariant - A % of the feed can consist of ads. # The invariant has no concept of time, so you can # imagine this holds for an infinite feed of all posts/ads. num(ads + posts) = num(posts) * (1 + r) # Rearranging this. n(ads) = num(posts) * (1 + r) - num(posts) # Calculating the rate of posts per interval (e.g. per minute) # is left as an exercise to the coder. ``` Rewriting this for our contract: ```solidity= contract AttentionMarketplace: function make_bid(market, ad_publication, bid, expiry): num_posts = current_rate_posts_per_interval max_ads = num_posts * (1 + RISK_FACTOR) - num_posts ads_in_current_interval = len(ads.filter(past hour)) if (ads_in_current_interval + 1 < max_ads_per_interval) { emit Bid(market, ad_publication, bid, expiry); } ``` So we've solved the problem of determining how many ad slots there are. We should now figure out how to efficiently price those ad slots. Thankfully, this is simpler. We hold an auction! The Attention Market Maker holds fixed-length auctions, whereby advertisers submit bids for a user's attention. Every 10mins, the highest bidder's order is filled. Users can submit bids with an expiry, avoiding the complexity of continually adjusting their price. Advertisers permissionlessly post bids to the AMM, sending `(attention_market, bid, adPub, expiry)`. There is only one attention market per $ATTN token, so attention_market is set to the $ATTN address. Once the round has elapsed, anyone may now fill the top bid - we imagine that through the dapp, the fill would automatically be sent in the background through a meta-transaction service. However if this does not happen, keepers are incentivised to perform this functionality, for a fee. The rate of posts for a feed (feed activity factor) is computed continuously by an offchain service, and provided on-chain by callers during the bid fulfillment process every 10mins. The design follows MakerDAO's design for price feeds - if the latest value becomes stale, the entire attention market for that user freezes functionality. ### 1.2. Tokenising influence. From getting more followers, we accrue influence - as we now have the ability to bid for their attention in their feeds. The total set of all attention tokens that a user owns is referred to as their "influence". This portfolio is represented as a "influence NFT" with special mechanics. 1. It is fractional - eg. it is fungible like ERC20's 2. The attention tokens in the portfolio can be sold. 3. The selling of the attention tokens in the portfolio is streamable - e.g. like yield farming. ### 1.3. Fame Derivatives What if there was a way to buy a derivative on a follower count? So if you discovered a content creator early, you could profit on their increase in followers aka influence. We submit that fame = influence. This could be implemented using attention-weighted feeds and influence NFT's. - The influence NFT grants the holder access to attention tokens in its portfolio - both present and future. - By selling a portion of your rights to "influence" in future, you can sell exposure to your fame. Let's design a fame derivative: - parameters: the derivative entitles holder to X% of issuer’s influence for Y years. - creation: X% of the influence NFT is transferred to the fame derivative contract. - claiming: for the duration of Y years, the holder of the derivative NFT can claim the attention tokens held in the "influence NFT". - settlement: after Y years, the contract returns the X% of influence NFT to the issuer. ### 1.4. Using fame derivatives to reward curators. Now that we can get exposure to someone's fame, we can build user flows which reward curators in social networks. Every user will automatically have a certain proportion (default 20%) of their "influence NFT" deposited on an AMM like Uniswap. When a curator comes along and finds an unknown artist, that they believe will become very famous, they can buy this derivative. The unknown artist receives the proceeds of the sale, which they can use to fund their work. The artist now "makes it", and has 1M followers. Their influence NFT contains a portfolio of 1,000,000 different attention tokens. The value of the influence NFT is sum of the price of each attention token in its portfolio multiplied by its balance of it. The curator, who has bet early, claims the proceeds of their fame derivative. - For the first 2yrs, the artist accrued $1.2M of influence. - This influence is the attention portfolio of over 1M followers. - The curator calls FameDerivative.claim, and receives a set of 1M attention tokens. - The curator places a sell order for these 1M tokens, and receives USDC in return. ## 2. Technical details ### Technologies. - **Open social graph**. [Lens Protocol](https://lens.dev/) is used for this. - **Money streams**. Something like [Superfluid](https://www.superfluid.finance/), or repurposing Andre's StakingRewards.sol yield farming contracts. - **Automated Market Maker**. We intend to use Uniswap here as the best-in-class for gas. ### Contracts. - `AttentionToken` - ERC1155. - `AttentionInflation` - module which handles inflation for attention. - `InfluenceNFT` - ERC1155. - `FameDerivativeNFT` - ERC1155. In V2: - `Treasury` - protocol treasury where fees go. - `GlissToken` - ERC20. - `Staking` - staking contract which issues GLISS. ### Blockchain. We are going to deploy on Polygon initially. ### Feed indexer. The feed indexer is responsible for serving the feed of posts to the user. It ranks posts according to their bid for attention. ## 3. Tokenomics, Staking, and Governance. The protocol takes a fixed 5% on all attention issued and fame derivatives sold. These fees go to the protocol treasury. Users can stake their attention to receive GLISS, the native governance token of the platform. The governance token allows them to vote on the parameters of the protocol (fees). The treasury is governed in part by the protocol. It is important for the network to grow and be well-managed by people with relevant competency. We haven't yet decided on a model for governance. It will be similar to Synthetix's voting (quadratic weighting) and term periods. ## 4. Conclusion In this whitepaper, we have redesigned the attention economy using web3. To do this, we have introduced several new primitives: * Attention tokens. * Feeds as attention marketplaces. * Fame derivatives. The effects of this new design are manifold: * New mechanisms for rewarding curators. * New ways to design the feed.