...
...
The contract assumes a rental amount and total payments needed for ownership. It only allows the tenant to make payments, which must be the exact amount of the rent. Each payment is counted and stored in the global and local state of the contract. If the payment count reaches the total needed for ownership, the contract will mark the property as owned.
It's important to note that this contract is quite simplified compared to the Solidity version. Due to the differences in contract structure between Ethereum and Algorand, not all the functionality of the Solidity contract can be replicated in PyTeal. In particular, handling overpayments or adjusting the rental amount would need to be handled off-chain. Additionally, for more complex functionalities and interactions with other contracts, Algorand offers Atomic Transfers and Algorand Standard Assets (ASAs).
As with the Solidity version, this is a basic model and doesn't cover all possible edge cases or legal requirements. It's recommended to consult with a legal and financial advisor when creating real-world contracts.
Solidity |
Teal |
|
---|---|---|
Template | >>> | >>> |
Architectural Design | >>> | >>> |
Architecture Competition | >>> | >>> |
Housing Cooporative | >>> | >>> |
Land Registry | >>> | >>> |
Real-Estate Crowdfunding | >>> | >>> |
Rent-to-Own | >>> | >>> |
Self-Owning Building | >>> | >>> |
Smart Home | >>> | >>> |
This is an open-source project by the Block Foundation.
The Block Foundation mission is enabling architects to take back initiative and contribute in solving the mismatch in housing through blockchain technology. Therefore the Block Foundation seeks to unschackle the traditional constraints and construct middle ground between rent and the rigidity of traditional mortgages.
website: www.blockfoundation.io
We'd love for you to contribute and to make this project even better than it is today! Please refer to the contribution guidelines for information.
Copyright © 2023 Stichting Block Foundation. All Rights Reserved.
Except as otherwise noted, the content in this repository is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) License, and code samples are licensed under the Apache 2.0 License.
Also see LICENSE and LICENSE-CODE.
THIS SOFTWARE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.