540 days ago
Transforming Real-World Asset Management with Tangible and Gelato's Web3 Functions
Welcome to the future of real estate investment! Tangible, an innovative platform, brings real-world assets to the DeFi landscape by converting them into tangible non-fungible tokens (TNFTs). These TNFTs represent real-world assets, such as real estate, and can be traded, sold, or redeemed for the physical asset at any given time.
To ensure the efficient management of these assets and the income they generate, Tangible has harnessed the power of Gelato's Web3 Functions, streamlining and automating critical processes within the platform.
Automating Tangible's Functions
Automated Rent Distribution:
With Gelato, Tangible has automated the process of rent collection and distribution to real estate token holders. Now, the system tracks the rent payments and triggers automatic distribution once a specified threshold is reached, replacing the need for manual rent distribution.
Fractional Ownership Management
The Gelato-powered system also takes care of fractional ownership of real estate tokens. If a token has full ownership or if there are multiple fractional tokens, it triggers the defractionalization process automatically.
Rent Collection
The system also manages rent collection from the tenants. Once the rent due reaches a pre-determined threshold, it initiates the rent collection process, eliminating the need for manual follow-ups.
Integrations
The combination of Tangible and Gelato's Web3 Functions provides an automated system that efficiently handles real estate investment in blockchain. The system tracks rent collection, automatically triggering distribution to token holders when a preset threshold is reached. Additionally, it manages fractional ownership of real estate tokens, initiating a defractionalization process when necessary.
Here's a breakdown of the process:
Tracking and Rent Collection
In the first stage, the system keeps track of real estate tokens and calculates the rent attributable to each token.
const numTokens = await treasuryTracker.tnftTokensInTreasurySize(realEstateContractAddress).then((result) => result.toNumber());
if (numTokens > 0) {
const i = Math.floor((/* @__PURE__ */ new Date()).getTime() / 6e4) % numTokens;
const tokenId = await treasuryTracker.tnftTokensInTreasury(realEstateContractAddress, i);
}
Once the rent accumulated for each token reaches a certain threshold, the system triggers the rent collection process.
const claimable = await revenueShare.claimableForToken(realEstateContractAddress, tokenId);
if (claimable.gt(0)) {
const data = rentCollector.encodeFunctionData("collectRent", [i, 0, false]);
return {
canExec: true,
callData: rentCollector.encodeFunctionData("execute", [data])
};
}
Fractional Ownership and Defractionalization
The second stage involves managing fractional ownership of real estate NFTs. The system checks the ownership share of each token and if a token has full ownership, it initiates the defractionalization process.
const fractionTokenIds = await treasuryTracker.getFractionTokensInTreasury(fractionContractAddress);
const tokenShare = await fraction.fractionShares(fractionTokenIds[0]);
if (fractionTokenIds.length > 1 || fullFraction) {
const data = rentCollector.encodeFunctionData("defractionalize", [
fractionContractAddress,
fractionTokenIds
]);
defractionalizeTransactions.push(data);
}
Distribution of Rent Payments
Finally, the system handles the distribution of rent payments to token holders. It checks for claimable rent amounts for the token and if there's claimable rent, it initiates the rent collection process.
const claimable = await revenueShare.claimableForToken(fractionContractAddress, fractionTokenIds[k]);
if (claimable.gt(0)) {
const data = rentCollector.encodeFunctionData("collectRent", [j, k, true]);
return {
canExec: true,
callData: rentCollector.encodeFunctionData("execute", [data])
};
}
This system simplifies rent distribution, providing token holders with a seamless and efficient user experience.
Get Started!
Gelato's Web3 Functions provide an innovative solution for developers to create serverless, decentralized applications with ease. They enable seamless integration of smart contracts with off-chain data, bridging the gap between on-chain and off-chain worlds.
Join our community and developer discussion on Discord.
Web3 Functions are available today in private beta. For more information, please check out the Web3 Functions documentation. To learn how to write, test, and deploy your own Web3 Functions, use this Hardhat template
Apply here to test Web3 Functions!