Overview of NFTs & IBC packet structure within the FreeFlix Media Hub

OmniFlix Network
FreeFlix Media Labs
7 min readJun 9, 2020

The FreeFlix Media & Cosmic Compass teams came together to demonstrate activities within an ideal media ecosystem, on blockchain.

In the context of media asset management, distribution & monetization, two independent blockchains communicating (using Cosmos IBC) to each other, can perform the following transactions:

  1. asset creation / NFT minting
  2. licensing
  3. ownership attribution
  4. community based engagement with media (NFTs are booked in a slot within a YouTube Live Stream)
  5. monetization with sponsored overlay Ads
  6. revenue distribution (instant/time based)

We implemented an NFT structure with not only a parent-child/primary-secondary relation, but also used another NFT to extend properties. Although this concept can be used in many contexts, the current implementation primarily deals with an architecture that suits the media ecosystem well.

Finally, we acknowledge this article has content meant for GitHub, but we believe as more & more people keep reading, people that understand what an NFT is, can understand when they read this article and go through each structure.

The FreeFlix Media Network’s root chain, FreeFlix Media Hub, has 2 chains:

  1. freeflix-media-hub RPC
  2. coco-post-chain RPC

Listed below are the base NFT types along with the structure of IBC packets to clearly demonstrate activities on the platform.

1) BaseTweetNFT

  • This object stores all required details about the primary and secondary NFTs.
  • Created & used by both freeflix-media-hub (FreeFlix) & coco-post-chain (CoCo) chains.
type BaseTweetNFT struct {	PrimaryNFTID string `json:"primary_nftid"`
PrimaryOwner string `json:"primary_owner"`
SecondaryNFTID string `json:"secondary_nftid"`
SecondaryOwner string `json:"secondary_owner"`
License bool `json:"license"`
AssetID string `json:"asset_id"`
LicensingFee sdk.Coin `json:"licensing_fee"`
RevenueShare sdk.Dec `json:"revenue_share"`
TwitterHandle string `json:"twitter_handle"`
}

2) BaseAdNFT

  • This object refers to information of an Ad NFT.
  • Created on the freeflix-media-hub.
  • Used to book/reserve within a slot in the Live Stream NFT on coco-post-chain.
type BaseAdNFT struct {
AdNFTID string `json:"ad_nftid"`
Owner string `json:"owner"`
AssetID string `json:"asset_id"`
}

3) Base TwitterAccountInfo

  • This object refers to the Twitter handle associated with a specific blockchain address.
  • This is used to track ownership attribution for creators/owners that are NOT registered as part of the network.
  • Tokens are stored and are transferred to specific handles when they verify their account on the freeflix-media-hub.
type TwitterAccountInfo struct {
Owner sdk.AccAddress `json:"owner"`
Handle string `json:"handle"`
ClaimStatus bool `json:"claim_status"`
LockedAmount sdk.Coins `json:"locked_amount"`
}
  • LockedAmount & ClaimStatus here, are utilized for accounts that are not registered on neither of the blockchains, but still have their Tweets being licensed by the marketplace through the License Unlisted Assets option within the CoCo Marketplace.

4) BaseLiveStream

  • This object refers to details about the live stream.
  • The NFT exists on the CoCo Chain and is currently only created by the FreeFlix Media team.
  • This NFT address is utilized by the FreeFlix Runner (app with an independent database to handle media storage, encoding & scheduling & streaming).
  • The Live Stream NFT used created for GOZ has a default revenue share of 20%.
type BaseLiveStream struct {
OwnerAddress sdk.AccAddress `json:"owner_address"`
LiveStreamID string `json:"live_stream_id"`
CostPerAdPerSlot sdk.Coin `json:"cost_per_ad_per_slot"`
RevenueShare sdk.Dec `json:"revenue_share"`
DNFTIDs []string `json:"dnftids"`
Payout time.Duration `json:"payout"`
SlotsPerMinute uint64 `json:"slots_per_minute"`
Status string `json:"status"`
}

5) BaseDNFT

  • A DNFT here, means a Dimensionalized NFT.
  • Although there exists a parent-child relationship between the LiveStreamNFT and a DNFT, this is not similar to the inheritance model followed by an sNFT (which is a secondary NFT of the primary Tweet NFT on freeflix-media-hub).
  • The DNFT essentially extends the Live Stream in a dimension with it’s own properties.
  • This DNFT is used during distribution where tokens, paid by the Ad NFT owner to the Live Stream NFT owner for a sponsored ad, are deposited into the account of the Tweet NFT owners.
type BaseDNFT struct {
DNFTID string
ProgramTime time.Time // RFC3339 date ex: 2020-03-03T06:26:19.862851614Z
AdNFTID string
AdNFTAssetID string
NFTID string
TweetAssetID string
PrimaryNFTAddress string
TwitterHandleName string
Status string
LiveStreamID string
Type string
LockedAmount sdk.Coin
}

Packet Types

Packet types represent the structure used to transfer data between chains during cross-chain communication

1) PacketBaseNFT

  • This object refers to the packet that is used to transfer data of Tweet NFTs and Ad NFTs between the freeflix-media-hub and the coco-post-chain
type PacketBaseNFT struct {
PrimaryNFTID string `json:"primary_nftid"`
PrimaryNFTOwner string `json:"primary_nft_owner"`
SecondaryNFTID string `json:"secondary_nftid"`
SecondaryNFTOwner string `json:"secondary_nft_owner"`
AssetID string `json:"asset_id"` License bool `json:"license"`
LicensingFee sdk.Coin `json:"licensing_fee"`
RevenueShare sdk.Dec `json:"revenue_share"`
TwitterHandle string `json:"twitter_handle"`
}

2) PacketPayLicensingFeeAndNFTTransfer

  • This object refers to the packet that is used during the licensing of a pNFT by an account on the freeflix-media-hub to a user on the coco-post-chain — after payment of a licensing fee (in COCO tokens)
  • After payment of COCO tokens, an sNFT (or a Secondary NFT) is minted on the coco-post-chain for use within the chain
  • All this, within one IBC round trip transaction
type PacketPayLicensingFeeAndNFTTransfer struct {
PrimaryNFTID string `json:"primary_nftid"`
LicensingFee sdk.Coin `json:"licensing_fee"`
Recipient string `json:"recipient"`
Sender string `json:"sender"`
}

3) PacketSlotBooking

  • This object refers to the structure used to book a slot on the coco-post-chain.
  • This object refers to transfer of a Tweet NFT or an Ad NFT to book a slot at a specific time, within the CoCo chain’s live stream.
  • An Ad NFT pays the Live Stream NFT a specific amount to be streamed.
type PacketSlotBooking struct {
PrimaryNFTID string `json:"primary_nftid"`
PrimaryNFTOwner string `json:"primary_nft_owner"`
TweetNFTAssetID string `json:"tweet_nft_asset_id"`

HandleName string `json:"handle_name"`
LiveStreamID string `json:"live_stream_id"`

AdNFTID string `json:"ad_nftid"`
AdNFTAssetID string `json:"ad_nft_asset_id"`

ProgramTime time.Time `json:"program_time"`
Amount sdk.Coin `json:"amount"`
}

4) PacketTokenDistribution

  • This object represents the structure used to handle distribution of funds after the streaming of a slot / dNFT on CoCo
type PacketTokenDistribution struct {
AmountLocked sdk.Coin `json:"amount_locked"`
Recipient string `json:"recipient"`
Handler string `json:"handler"`
Sender string `json:"sender"`
}

Transaction Flow

putting it all together

The walk-through demonstrated here is to create an asset (NFT) on chain A (FreeFlix) and use it within a Live Stream/Linear Broadcast, powered by chain B (another independent chain, CoCo).

  • Visit — goz.freeflix.media and verify your Twitter handle to connect with an address on the freeflix-media-hub BaseTweetNFT is used to create an asset.
  • Use a tweet from the verified Twitter account & create a Tweet NFT (Primary NFT or pNFT) on FreeFlix, using the verified Twitter account.
  • Similarly, brands create their Ad NFT for sponsored overlay Ads within the Live Stream — BaseAdNFT is used to create an asset.
  • If you choose to license to the Tweet/media asset, a licensing fee is received & a revenue share is earned every time this pNFT is used. In the current implementation, licensing happens only on the coco-post-chain and to its accounts.
  • After licensing the pNFT, you generate a Tweet NFT on the coco-post-chain, which is a Secondary NFT or sNFT of the pNFT on freeflix-media-hub.
  • This sNFT can be distributed for streaming on the Live Stream powered by the coco-post-chain.
  • This sNFT transfers the pNFT owner & pays a one time licensing fee. Also, since there it is on a revenue share basis, the sNFT owner transfers a % of the earnings, every time the asset is used.
  • A Live Stream is created on the coco-post-chain — BaseLiveStream is used to create the Live Stream by the FreeFlix Media team.
  • A Tweet NFT (or) an Ad NFT can book a slot within the Live Stream. This Tweet NFT can be a pNFT from FreeFlix or sNFT from CoCo.
Live Stream Scheduling — Options to list either a Tweet NFT (pNFT on FreeFlix or an sNFT on CoCo) exists along with an Ad NFT
  • Upon successful booking of both a Tweet NFT & an Ad NFT, a Dimensionalized NFT (or dNFT) is created & a confirmation appears with details of the NFTs that were chosen — BaseDNFT is used to create the slot after the first booking.
Select a Tweet NFT —The NFT with ID ffmttweetnft449 was chosen
Profile picture of the Twitter account appears and the ONLY option of booking an Ad NFT exists
Choose an Ad NFT— ffmtadnft12
Details of the slot booking with the dimensionalized NFT created on the blockchain
  • While reserving/booking a slot in livestream, a brand pays tokens (10 FFMT) which is distributed to the pNFT or sNFT played.
  • If an sNFT is used, the owner of the pNFT, gets a fee (in FFMT) as per the revenue share.

Get in touch!

Know someone that can utilize the FreeFlix Media Suite (or) if you are looking to implement it for your organization / your decentralized community, get in touch with us.

For more news reg. the development of media tooling by FreeFlix Media, please get in touch with us via https://FreeFlix.media or by writing to us at info@freeflix.media

Follow FreeFlix Media Labs on Twitter, Telegram, Facebook, Instagram (FreeFlix Media Labs), Instagram (FreeFlix Live), GitHub and Medium. Do not forget to check out our platform for curated streams from YouTube — FreeFlix LIVE

--

--

OmniFlix Network
FreeFlix Media Labs

p2p network for creators, curators & sovereign communities to mint, manage, distribute & monetize media assets & communities — https://OmniFlix.network