Revenue Distribution Contract

Introduction

Blocksquare enables anyone with an internet connection to invest in individual real estate assets through purchase of BSPT tokens. Some real estate assets generate revenues due to rental agreements between the property owner and tenant(s) of the property.

Through the tokenization process, the owner agrees to transfers economic rights onto BSPT token holders, which is achieved with the signing of a Corporate resolution in which the percentage of revenues is specified. These recurring revenues are to be converted into a stablecoind (e.g. DAI, USDC, USDT) and distributed to BSPT token holders on a predefined time interval (e.g. monthly, quarterly or annually) based on the amount of tokens issued, where 100,000 BSPT represents 100% of the economic rights of the property.

As BSPT tokens can also be traded on the secondary market, there is a certain complexity when it comes to calculating how much of the total revenues should be distributed to each individual BSPT token holder for a given time period. To accurately execute this an off-chain algorithm has been developed by Blocksquare that is then used to place deposits into the Revenue Distribution smart contract deployed on Ethereum mainnet.

The smart contract key functions are listed below.

Key Events

Event
Description

RevenueAdded(address indexed property, address[] users, uint256[] amounts, uint256 fromTime, uint256 toTime)

An event emitted whenever new revenue is added.

RevenueClaimed(address indexed property, address indexed user, uint256 amount, uint256 time)

An event emitted whenever a user is claiming revenue

Add Revenue

Used to add revenue for a specific property and distribute it among users. Only the system administrator or authorized certified partner can call this function.

Revenue Distribution

function addRevenue(address property, address[] memory users, uint256[] memory amount, uint256 from, uint256 to)
  • property: The address of the property

  • users: An array of user addresses that we want to add revenue for

  • amount: An array of amounts that we want to add for the users

  • from: Start date for revenue calculation

  • to: End date for revenue calculation

  • RETURN: No return, reverts on error.

Solidity

Web3 1.2.6

Claim Revenue For Single Property

Used to claim the pending revenue for a single wallet and property. This function doesn't restrict the caller, so you can claim revenue on behalf of other users and send it to their wallet.

Revenue Distribution

  • wallet: Wallet address that has outstanding revenue and that should receive it

  • property: Property address for which you want to claim revenue

  • RETURN: No return, reverts on error.

Solidity

Web3 1.2.6

Claim Revenue For Multiple Properties

Used to claim the pending revenue for a single wallet and multiple properties. This function doesn't restrict the caller, so you can claim revenue on behalf of other users and send it to their wallet.

Revenue Distribution

  • wallet: Wallet address that has outstanding revenue and that should receive it

  • properties: Array of property addresses for which you want to claim revenue

  • RETURN: No return, reverts on error.

Solidity

Web3 1.2.6

Push Revenue To User

Used to claim the pending revenue for a single property and multiple wallets. This function doesn't restrict the caller, so you can claim revenue on behalf of other users and send it to their wallet.

Revenue Distribution

  • property: Property address that has outstanding revenue

  • wallets: Array of wallet addresses for which you want to claim revenue

  • RETURN: No return, reverts on error.

Solidity

Web3 1.2.6

Pending Revenue

Used to check the amount of pending revenue for a specific property and user.

Revenue Distribution

  • property: Property address that has outstanding revenue

  • user: User address for which you want to check outstanding revenue

  • RETURN: The amount of outstanding revenue (integer)

Solidity

Web3 1.2.6

Total Pending Revenue

Used to check the total outstanding revenue for a specific user.

Revenue Distribution

  • user: User address for which you want to check the total outstanding revenue

  • RETURN: The amount of outstanding revenue (integer)

Solidity

Web3 1.2.6

Average Monthly Payout

Used to check the average monthly payout for a specific property.

Revenue Distribution

  • property: Address of the property we want to check the average monthly payout for

  • RETURN: The amount of average monthly payout (integer)

Solidity

Web3 1.2.6

Total Payout

Used to check the amount of total payouts for a specific property.

Revenue Distribution

  • property: Address of the property we want to check the total payout for

  • RETURN: The amount of total payout (integer)

Solidity

Web3 1.2.6

Last updated