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
RevenueAdded(address indexed property, address[] users, uint256[] amounts, uint256 fromTime, uint256 toTime)
RevenueClaimed(address indexed property, address indexed user, uint256 amount, uint256 time)
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
property
: The address of the propertyusers
: An array of user addresses that we want to add revenue foramount
: An array of amounts that we want to add for the usersfrom
: Start date for revenue calculationto
: End date for revenue calculationRETURN
: 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 itproperty
: Property address for which you want to claim revenueRETURN
: 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 itproperties
: Array of property addresses for which you want to claim revenueRETURN
: 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 revenuewallets
: Array of wallet addresses for which you want to claim revenueRETURN
: 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 revenueuser
: User address for which you want to check outstanding revenueRETURN
: 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 revenueRETURN
: 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 forRETURN
: 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 forRETURN
: The amount of total payout (integer)
Solidity
Web3 1.2.6
Last updated