{"id":21529358,"url":"https://github.com/kaonone/akropolis-c2fc-srml","last_synced_at":"2026-02-25T20:30:56.044Z","repository":{"id":98677868,"uuid":"168162853","full_name":"kaonone/akropolis-c2fc-srml","owner":"kaonone","description":"Akropolis C2FC Implementation (early stage)","archived":false,"fork":false,"pushed_at":"2019-08-05T11:11:59.000Z","size":506,"stargazers_count":14,"open_issues_count":1,"forks_count":7,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-06-19T20:04:05.897Z","etag":null,"topics":["akropolis","akropolis-network","c2fc","polkadot","srml","substrate"],"latest_commit_sha":null,"homepage":"https://akropolis.io","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaonone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-01-29T13:52:49.000Z","updated_at":"2022-08-23T10:04:51.000Z","dependencies_parsed_at":"2023-03-21T02:18:06.528Z","dependency_job_id":null,"html_url":"https://github.com/kaonone/akropolis-c2fc-srml","commit_stats":null,"previous_names":["kaonone/akropolis-c2fc-srml","akropolisio/akropolis-c2fc-srml"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kaonone/akropolis-c2fc-srml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaonone%2Fakropolis-c2fc-srml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaonone%2Fakropolis-c2fc-srml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaonone%2Fakropolis-c2fc-srml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaonone%2Fakropolis-c2fc-srml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaonone","download_url":"https://codeload.github.com/kaonone/akropolis-c2fc-srml/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaonone%2Fakropolis-c2fc-srml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29838027,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T19:08:47.527Z","status":"ssl_error","status_checked_at":"2026-02-25T18:59:04.705Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["akropolis","akropolis-network","c2fc","polkadot","srml","substrate"],"created_at":"2024-11-24T01:57:03.710Z","updated_at":"2026-02-25T20:30:56.011Z","avatar_url":"https://github.com/kaonone.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Akropolis C2FC\n\nImplementation of financial primitive Commitments to Future Cashflows on Substrate. C2FC is a new financial primitive and a DeFi equivalent of cashflow financing. C2FC bridges traditional finance and Web3 by providing DeFi and Web3 entrepreneurs with capital to grow. For more details read about C2FC  [here](https://wiki.akropolis.io/c2fc/overview/).\n\n\n## Try it out\n\n- [telemetry](https://telemetry.polkadot.io/#/Akropolis)\n- [polkadot.js.org](https://polkadot.js.org/apps/)\n\nConnect to local node:\n*  Go to [admin tools / settings](https://polkadot.js.org/apps/#/settings).\n*  Select __remote node/endpoint to connect to__ =\u003e `Local Node`.\n*  Press `Save \u0026 Reload`\n\n\n## Install Rust:\n\n```bash\ncurl https://sh.rustup.rs -sSf | sh\n```\n\n\n## Setup Node\n\n\n```bash\n#!/usr/bin/env bash\nset -e\nmkdir akropolis\ncd akropolis\ngit clone https://github.com/akropolisio/akropolis-polkadot.git ./node\n# or git clone git@github.com:akropolisio/akropolis-polkadot.git ./node\ncd node\n# Install required tools:\n./scripts/init.sh\n# Build the WebAssembly binary:\n./scripts/build.sh\n# Build all native code and install:\ncargo install --force --path ./ akropolis\ncd ..\n# Build chain-spec and export:\nakropolis build-spec --chain akropolis \u003e spec.json\n```\n\n\n## Run Node\n\n\n```bash\n#!/usr/bin/env bash\n\nakropolis --chain akropolis \\\n    --telemetry-url wss://telemetry.polkadot.io/submit/ \\\n    --rpc-cors all \\\n    --name \"AkropolisC2FC-NodeName\" \\\n    --base-path ./base \\\n    --keystore-path ./keystore \\\n    --listen-addr /ip4/0.0.0.0/tcp/30333 \\\n    --bootnodes \\\n          /ip4/178.128.225.241/tcp/30333/p2p/QmbdSLdQ5yyRG5kCLLUCDyG7FUwbqtHngRWCJyG6yULWax \\\n          /ip4/157.230.35.215/tcp/30333/p2p/QmbmedQMeErSiQH2AFXyb9MSNxtUNJAdH6CY6hWcdKuXJi\n```\n\n\n## How it works\n\n### Creation of C2FC\n\nPrerequisites:\nYou should have accounts with positive balance to test creation / transfer / exchange of C2FC (let's create this account with seed `//Alice`, `//Bob`, `//Charlie`).\n\n\nCore elements of C2FC on Substrate implementation:\n\n- User accounts\n- FreePromise\n- Promise\n- Bucket\n- Resitrar (Storage-module C2FC)\n\nCreation of C2FC consists of two steps: at first, you create *Free Promise* and then assign a payee to it (*Promise* stage). While C2FC is in the *Free Promise stage*, it hasn’t recipient of payments (issuer is a recipient).\n\n\n\n- go to [Extrinsics](https://polkadot.js.org/apps/#/extrinsics)\n- Alice creates Bucket:\n    - select __using the selected account__ =\u003e Alice\n    - select __submit the following extrinsic__ `C2FC` :: `createBucket()`\n    - `Submit Transaction`\n\n- Bob creates Promise:\n    - select __using the selected account__ =\u003e Bob\n    - select __submit the following extrinsic__ `C2FC` :: `createPromise(value, period)` where\n        - `value`: amount of regular payment\n        - `period`: periodicity of regular payment\n    - `Submit Transaction`\n\n\n- Bob creates temporary Promise:\n    - select __using the selected account__ =\u003e Bob\n    - select __submit the following extrinsic__ `C2FC` :: `createPromiseUntil(value, period, until)` where\n        - `value`: amount of regular payment\n        - `period`: periodicity of regular payment\n        - `until`: date (block) of last payment\n    - `Submit Transaction`\n\n- Bob makes changes to Promise:\n    - select __using the selected account__ =\u003e Bob\n    - select __submit the following extrinsic__ `C2FC` :: `editPromise(promise_id, value, period)` where\n        - `promise_id`: id (hash) of Bob's promise\n        - `value`: amount of regular payment\n        - `period`: periodicity of regular payment\n    - `Submit Transaction`\n\n- Bob stakes tokens in order to ___ the Promise:\n    - select __using the selected account__ =\u003e Bob\n    - select __submit the following extrinsic__ `C2FC` :: `stakeToPromise(promise_id, amount)` where\n        - `promise_id`: id (hash) of Bob's promise\n        - `amount`: size (amount) of stake\n    - `Submit Transaction`\n    - select __submit the following extrinsic__ `C2FC` :: `withdrawStaken(promise_id)` where\n        - `promise_id`: id (hash) of Bob's promise\n    - `Submit Transaction`\n\n### Exchange of C2FC\n\n- Alice sells his Bucket:\n    - select __using the selected account__ =\u003e Alice\n    - select __submit the following extrinsic__ `C2FC` :: `setPrice(bucket_id, new_price)` where\n        - `bucket_id`: id (hash) of Bob's promise\n        - `new_price`: price of the Bucket\n    - `Submit Transaction`\n    - select __using the selected account__ =\u003e Charlie\n    - select __submit the following extrinsic__ `C2FC` :: `buyBucket(bucket_id, max_price)` where\n        - `bucket_id`: id (hash) of Alice's promise\n        - `max_price`: Charlie's maker price\n    - `Submit Transaction`\n- Alice transfers Bucket:\n    - select __using the selected account__ =\u003e Alice\n    - select __submit the following extrinsic__ `C2FC` :: `transfer(to, bucket_id)` where\n        - `to`: receiver of Bucket (Charlie's account)\n        - `bucket_id`: id (hash) of Alice's Bucket\n    - `Submit Transaction`\n\n- Alice is searching Bob's Promise:\n    - go to [ChainState](https://polkadot.js.org/apps/#/chainstate)\n    - select __selected state query__ =\u003e C2FC\n    - use any method with name starts with `freePromise...`\n        - `freePromisesCount(): u64`: number of open Promises\n        - `freePromisesArray(u64): Hash`: get id (hash) of open Promise by increment\n        - `freePromisesIndex(Hash): u64`: get increment number of open Promisy by it's id (hash)\n        - `promises(Hash): FreePromise`: get Promise by id(hash)\n    - click `+`\n\n- Alica adds Bob's Promise to her Bucket:\n    - select __using the selected account__ =\u003e Alice\n    - select __submit the following extrinsic__ `C2FC` :: `acceptPromise(promise_id, bucket_id)` where:\n        - `promise_id`: id (hash) of Bob's Promise\n        - `bucket_id`: id (hash) of Alice's Bucket\n    - `Submit Transaction`\n\n### Pay for commitments\n\n- Bob pays his commitments to Bucket Owner:\n    - select __using the selected account__ =\u003e Bob\n    - select __submit the following extrinsic__ `C2FC` :: `fillBucket(bucket_id, deposit)` where:\n        - `bucket_id`: id (hash) of Alice's Bucket\n        - `deposit`: funds, that trasferred from Bob's account to Bucket owner's account\n    - `Submit Transaction`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaonone%2Fakropolis-c2fc-srml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaonone%2Fakropolis-c2fc-srml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaonone%2Fakropolis-c2fc-srml/lists"}