Replies: 3 comments 2 replies
-
agreed If the rental price is set from the Regarding the payment mechanism I was proposing during our call that the payment should not be classic monthly upfront payment, think we can do better than that. So based on the contract the tenant agrees, let's say the rental contract is 1 year, in a calandar year this is
If the rental payment is set to 15000USD annually, we can calculate the rental price per block. We would have to come up with period in which we expect this rent to be deposited and claimed. It's a bit the opposite of a vesting contract |
Beta Was this translation helpful? Give feedback.
-
In the above discussion we didn't really agree on a design for the recurring rent payment pallet. We have some inspiration for the payment-pallet and the vesting-pallet We have two parts of the recurring payments we need to work on, 1. is the mechanism of requesting payment & paying it, 2. Is distribution of the payment to the fractional owners. 1. Payment mechanismWe need to set some structs in for the payment lifetime that is required and this information comes from the rental contract schedule. This is a template more or less the same for each contract that is created, but it might be different. If we agree the standard rental contract is 24 Months. The struct below is inspired by the vesting pallet. pub struct ContractSchedule<BlockNumber, Balance: MaxEncodedLen + HasCompact> {
/// Rental contract starting block
pub start: BlockNumber,
/// Number of blocks between vest
pub period: BlockNumber, // fixed amount blocknumber for a month, based on our blocktime.
/// Number of payment period. If the contract is 1 year, this is 12. This is also taken along from the contract
pub period_count: u32,
/// Amount of rent that needs to be payed.
#[codec(compact)]
pub per_period: Balance,
/// The amount of rent that is already payed.
pub payed: Balance, // This is taken along for the payment pallet part.
} The above struct will help the payment pallet to know when to request payment after it publishes an event(
2. Distribution of the payment to the fractional ownersWe are using the automatic runtime actions a lot in our chain, a great feature. But most substrate based chains are doing lazy-payouts. This is simply because they want to keep the chain as light as possible. In Polkadot |
Beta Was this translation helpful? Give feedback.
-
Looked into it today:
|
Beta Was this translation helpful? Give feedback.
-
Suggested items:
Payment pallet
Beta Was this translation helpful? Give feedback.
All reactions