{"id":21374810,"url":"https://github.com/banool/aptos-tontine","last_synced_at":"2026-02-19T13:02:57.225Z","repository":{"id":61830611,"uuid":"540646598","full_name":"banool/aptos-tontine","owner":"banool","description":"Tontines on Aptos","archived":false,"fork":false,"pushed_at":"2024-09-09T15:52:03.000Z","size":1510,"stargazers_count":2,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-07T02:50:23.618Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://tontine.dport.me","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/banool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-23T23:16:45.000Z","updated_at":"2024-09-09T15:52:08.000Z","dependencies_parsed_at":"2024-09-09T19:06:59.816Z","dependency_job_id":"fb002ced-42cd-4411-b9e4-19b5e828611b","html_url":"https://github.com/banool/aptos-tontine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/banool/aptos-tontine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banool%2Faptos-tontine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banool%2Faptos-tontine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banool%2Faptos-tontine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banool%2Faptos-tontine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/banool","download_url":"https://codeload.github.com/banool/aptos-tontine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/banool%2Faptos-tontine/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265120151,"owners_count":23714490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T08:45:30.962Z","updated_at":"2025-10-19T08:16:53.001Z","avatar_url":"https://github.com/banool.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aptos Tontine\n\u003e Works of fiction ... often feature a variant model of the tontine in which the capital devolves upon the last surviving nominee, thereby dissolving the trust and potentially making the survivor very wealthy. It is unclear whether this model ever existed in the real world.\n\n\u0026mdash; _Tontine_, [Wikipedia](https://en.wikipedia.org/wiki/Tontine#In_popular_culture)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"misc/simpsons_tontine.png?raw=true\" width=\"60%\" alt=\"Simpsons Tontine\"\u003e\n\u003c/p\u003e\n\n\u0026mdash; _Raging Abe Simpson and His Grumbling Grandson in 'The Curse of the Flying Hellfish'_, [Wikipedia](https://en.wikipedia.org/wiki/Raging_Abe_Simpson_and_His_Grumbling_Grandson_in_%27The_Curse_of_the_Flying_Hellfish%27)\n\n\n## Summary\nThe tontine described here is a variant of the standard tontine that works as described above. In this scheme, people invest funds into a shared fund. It remains locked in the fund until only one member of the tontine remains.\n\nOrganizing a tontine on-chain has a variety of interesting properties, be them advantages or disadvantages:\n- In traditional tontines it is difficult to devise a mechanism where the funds can only be retrieved once one member remains. This is easily enforced on chain.\n- Aptos accounts need not necessarily be owned by a single individual. To avoid [wrench attacks](https://www.explainxkcd.com/wiki/index.php/538:_Security) they may use a multisigner account, either shared with other individuals, or just sharded in a way that makes it hard for another party to get the full key.\n- Aptos accounts do not strictly map to a single indvidiual (though a custodial [DID](https://www.w3.org/TR/did-core/) + KYC solution might). This has interesting implications. For example, a tontine could theoretically outlast generations, with accounts being handed down throughout time.\n\nMake sure you understand these properties before taking part in a tontine organized through this Move module.\n\n## Standard tontine lifecycle\nA tontine using this Move module proceeds through the following lifecycle.\n\n### Creator establishes a \"staging\" tontine\nAlice creates a \"staging\" tontine. In this she specifies:\n\n- Members (addresses) to be included in the tontine.\n- How much each member should contribute to the tontine.\n- How often each member must check in to prove they're still in control of their account (see below).\n- What happens if no one checks in within an interval. Options include:\n  - All funds get returned to the original accounts.\n  - Funds go to a preconfigured arbitrary account.\n  - Funds are burned (or locked up forever).\n\nThis corresponds to `OVERALL_STATUS_STAGING`.\n\n### Everyone commits funds to the tontine\nOnce the staging tontine has been created, each member commits funds to it.\n\nOnce this is complete, this corresponds to `OVERALL_STATUS_CAN_BE_LOCKED`.\n\n### A member locks the tontine\nOnce all members have committed their funds to the tontine (and only then), any member of the tontine can lock it (not just the original creator).\n\nThis corresponds to `OVERALL_STATUS_LOCKED`.\n\n### Members check in with the tontine\nTo prove that a member is still in control of their account / alive, they must check in periodically with the tontine. Given this costs gas, ideally this is infrequent, e.g. once every few months.\n\n### All members but one fail to check in\nOver time, members will cease checking in and eventually all but one will become ineligible to claim the funds. From this point, the last member standing is able to claim the funds up until their next latest check in time + the grace period.\n\nThis corresponds to `OVERALL_STATUS_FUNDS_CLAIMABLE`.\n\n### The last member standing claims the funds\nThe last standing member claims the funds.\n\nThis corresponds to `OVERALL_STATUS_FUNDS_CLAIMED`.\n\n## Irregular lifecycle events\nAbove describes the standard flow, there are other lifecycle events that may occur.\n\n### The creator adds a new member to a staging tontine\nWhile a tontine is in the staging state, the creator may choose to add a new member to the tontine. This will trigger a \"reconfirmation\" (see below).\n\n### The creator removes a member from a staging tontine\nWhile a tontine is in the staging state, the creator may choose to remove a new member from the tontine. If they have contributed funds, this will return their funds to them. This will trigger a \"reconfirmation\" (see below).\n\n### A member chooses to leave a staging tontine\nWhile a tontine is in the staging state, any member may choose to withdraw from the tontine. If they have contributed funds, this will return their funds to them. This will revoke their ability to re-enter the tontine and trigger a \"reconfirmation\" (see below).\n\nIf the creator leaves a staging tontine, this will cancel the tontine completely and return any funds to the members, which corresponds to `OVERALL_STATUS_CANCELLED`.\n\n### The creator alters a configuration value\nIt is possible to change some configuration values (anything in `TontineConfig`) while the tontine is in the staging state. If this happens it triggers a \"reconfirmation\" (see below).\n\n### Reconfirmation\nIf a member is added or leaves a staging tontine, a reconfirmation is triggered. If this happens, all members must call `reconfirm` to indicate that they still want to be part of the tontine given the recent changes. This mechanism exists to ensure that a tontine isn't changed and then locked at the final hour under the noses of the members.\n\n### No one claims the funds\nThroughout the course of the tontine eventually one member will be the last one who checked in during the check in window. However, if that member fails to claim the funds after this point + the grace period, the tontine will transition into fallback mode, in which case anyone (not just those in the tontine) may execute the fallback policy.\n\nThis initially corresponds to `OVERALL_STATUS_FUNDS_NEVER_CLAIMED` and then `OVERALL_STATUS_FALLBACK_EXECUTED`\n\n## FAQ\nQ: Can I make the tontine with assets besides APT?\nA: For now, no, but I'm considering how you might do this: https://github.com/banool/aptos-tontine/issues/3.\n\nQ: Is there a way to direct the account holding the tontine funds to take investment actions, such as using liquid staking or purchasing NFTs?\nA: Not right now, but it's on the roadmap: https://github.com/banool/aptos-tontine/issues/1, https://github.com/banool/aptos-tontine/issues/2.\n\nQ: In real life / fictional tontines, it is generally a rule that attempting to \"take out\" a member of the tontine would get you kicked out of the tontine, so as to discourage people forcibly making themselves the last member standing. How is this enforced with the Aptos tontine?\nA: It is not. Theoretically a tontine could be created with governance attached, in which, if every other remaining member votes to do so, they could kick a member out of the tontine (except in the case where only 2 members remain remaining case). This could obviously lead to all kinds of off chain collusion / corruption however, so for now I've chosen to leave this is an unsolved problem.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbanool%2Faptos-tontine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbanool%2Faptos-tontine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbanool%2Faptos-tontine/lists"}