Setting Up A Tontine
Last updated
Last updated
Manual ARPs can enable you to setup a tontine. A tontine is a joint financial arrangement whereby a group of people contribute equally to a prize that is awarded entirely to one of them every payment cycle.
Suppose User A, User B and User C started a tontine whereby they each contribute 10,000 USD tFIAT tokens to the tontine every month for 3 months. They agree that:
On Month One: User A gets the prize pot (30,000 USD)
On Month Two: User B gets the prize pot (30,000 USD)
On Month Three: User C gets the prize pot (30,000 USD)
Tontines are very popular in third world countries notably in African countries. The main issue with tontines though is the lack of trust in the participants to pay their due during each payment cycle and also the lack of trust in the treasurer in charge of the tontine's treasury.
ARP contracts are a fantastic way to solve all those issues with tontines. Let's setup the tontine described above between User A, B & C
The first step is to deploy a manual ARP like we did on this page
Click on the Details button of your ARP to reveal the panel
Since our tontine runs in USD, let's select the USD tFIAT token. Click on the Select a currency button to reveal the token wizard like in the image below. Click on the Manage Tokens button to reveal the form on the right, activate the PaySwap Onramp tokens then go back to the previous form
Search for and select the USD tFIAT token
You should now have the USD selected as in the image below. Click on the Control Panel button to show the control panel's menu
Click the Create/Update Account button; fill in the form on the right image below. Make sure you read the description for each parameter in order to provide the correct value
The Account Owner field has been set to the address of User A
The Amount Receivable field has been set to 10000 which is the amount of USD, User A will be paying the contract periodically
The Amount Payable field has been set to 30000 which is the amount of USD the contract pays User A
The Period Receivable has been set to 43200 which is the number of minutes in a month. This parameter sets the duration of each payment cycle from User A to the contract
The Period Payable has been set to 0, meaning the payment from the contract to User A will be a one-time payment.
The Start Receivable sets the date at which the contract should start counting seconds to the next payment of User A to the contract. We set this parameter to October 20th, 2023
The Start Payable sets the date after which the contract should let User A withdraw his/her due amount from the contract. We set this parameter to November 20th, 2023 which is the end of the first month of the tontine.
The Description parameter provides a descriptive comment about the account so we can remember the purpose of the account in the future.
Validate the form and reload the page. Tick the Mine Only button to only show your ARP contracts (this should enable you to find your ARP faster)
You should see the ID of your recently added account at the bottom left of your ARP's panel
Here is an image of our ARP panel before the new account has been added
And here is an image of our ARP panel after the new account has been added
Clicking on the ID of your recently added account (which in our example is 3) will show you the account details like in the image above. We can see that currently, the account is due 0 USD (Amount Due Payable) and owes 0 USD (Amount Due Payable), that the next payday for the account (Next Due Payable) is November 20th, 2023, and that the next due date for the account to pay the contract (Next Due Receivable) is also November 20th, 2023.
The ARP Liquidity parameter represents the amount of the token of the current account (USD) currently available in the ARP contract
To create accounts for the rest of the users, we proceed the same. We select the right token first (USD), then we create an account for our users. Here are images of those accounts being created:
As you can see, User B (on the left) is set to make a withdrawal of 30,000 from the contract on December 20th, 2023 (which is 2 months after the start of the tontine).
User C (on the right) is set to make a withdrawal of 30,000 from the contract on January 20th, 2024 (which is 3 months after the start of the tontine).
Congratulations! You have successfully created a tontine that will have Users A, B & C make monthly deposits of 10,000 USD for 3 months and reward one of them with 30,000 USD each month for 3 months.
To make our Tontine safe, we can take three quick actions:
Require our users who want to make withdrawals to not owe anything to the contract. To do so, go to your ARP's control panel menu and select the option Update Due Before Payable
Set the field on the form on the right to No so that users are required to be up to date on payments they owe the tontine before they can be paid by the tontine
Validate the form
Use bounties/collaterals to ensure the participants of our tontine are trustworthy. ARP contracts enable you to require your participants to attach bounties/collaterals to their accounts which can be claimed if they ever fail to make a payment. The value of this bounty is set when creating the account. It is the parameter Bounty Required which is the second to last parameter on the account creation form. In the image below, we are setting that value to 10000 USD tFIAT tokens.
ARP contracts can also be set up to limit the number of accounts created to just the number of participants in the tontine. This will prevent the admin of the ARP from stealing funds from the tontine by creating fake accounts with the sole purpose of withdrawing funds from the ARP. To do so, go to the Update Parameters option in your ARP contract's control panel menu, set the Max Number of Accounts to your max, and validate the form. In the example below, we are setting that number to 3 since we only have 3 participants in our tontine.
Congratulations! Your tontine is now much safer, and more transparent than others that don't run on the blockchain. In addition to that, it distributes and collects due payments automatically.