Buy Reactions

Once an NFT is registered in the protocol, users can purchase reactions based on the NFT. To do this, the caller interacts with the ReactionVault Contract by calling the “buyReaction()” function. The user will specify the Transform ID of the Reaction NFT to purchase and how many they would like to purchase.

When the Reaction is purchased, the protocol Payment Token and Reaction Price are looked up in the ParameterManager Contract and then used to determine how many payment tokens will be transferred from the caller’s wallet to the protocol. For example if the Payment Token is USDC and the reaction price is 1 USDC, then if the caller purchases 10 reactions, 10 USDC will be moved into the protocol from the caller’s address. These funds must be pre-authorized with an “approve” call on the payment token ERC-20 contract.

Once the payment has been received, the protocol will then mint ERC-1155 NFT contracts into the destination wallet specified by the buyer. These NFTs are non-transferable reactions and can only be spent (burned) in the protocol.

Funds

When funds are used to purchase reactions, they are allocated in different buckets.

Referrer

If the transaction includes an optional referrer address passed into the “buyReaction()” function call, that address will be assigned a percentage of the purchase price. This is provided to incentivize other protocols and applications to incorporate the RARA protocol.

Curator Liability

A majority of the funds will be set aside to be used when the purchased reactions are spent (burned) in the future.

Maker and Creator

The Maker, or owner who registered the NFT, will be allocated a percentage of the purchase price. If the Maker specified a Creator address when registering, they will also be allocated a percentage of the Maker’s amount.

The splits of the funds are defined by the parameters defined in the protocol and are stored in the ParameterManager Contract.

Buy Reaction Function

The transformId parameter should be looked up from previous NFT registrations in order to purchase the correct Reaction. If an EOA account is buying reactions then destinationWallet should just be the account's address that is making the purchase, as this could be used to send the reactions to a different address if desired.

If the referrer address is specified, that address will be credited a percentage of the purchase price. If your application is facilitating and building web3 transactions for users to buy reactions, you should set your address in this parameter to earn rewards denominated in payment tokens for every purchase you facilitate.

The optionBits parameter can be left as 0 until further functionality has been implemented.

Last updated

RARA, the Social Curation Protocol for NFTs. © 2020-2023 RARA Social Inc.