Share
Explore

Shared CirclesUBI infrastructure

Our Vision
We believe every human has the right to spark their joyfull passion towards an eventful, manifold and fullfilled life. We are restarting the way money works by introducing the Circles time currency, distributed as a universal basic income to equalize fair participation in the economy for every human.
Watch the video to learn more about our mission:

Group 624.png

Technical overview
Our current overall strategy is mainly to make things work stable and reliably even if centralized components are needed. Once everything is running smoothly, we take care of step by step re-decentralization of one component after another into a fully peer-to-peer architecture.
Docker Sandbox
One-Stop shop where all our components come together.
(D)app (o-platform)
Opensource frontend platform which is using the CirclesUBI as a first class citizen, while developing and creating more and more dapp’s inside its platform.
Techstack:
Svelte (, SPA-compiler for typescript/javascript)
TailwindCSS (, compiler for css)
xState ( - workflows/state machine)

Current Dapps:
Passport (all your account related stuff, such as your public profile, key management and settings)
Friends (will be split up into Chat and Contacts, currently only the Chat / Events stream)
Banking (Balance, Transactions and Assets Overview)
Market (Basic marketplace to offer and sell products and services)
Bildschirmfoto 2021-12-08 um 14.25.17.png
Blockchain Indexer
A custom crawler that “walks” all blocks from the blockchain and indexes all erc20 transactions and circles-related hub events into a postgres db. The data is then made available via resolvers in our graphql API.
Database API / GraphQL endpoint
Currently a centralized Postgres/NodeJS-based service
As Graphql ORM-layer we use Prisma
Development API:
(queries can be tested, once logged into the platform on https://dev.circles.land - if you want an invite let us know in discord)
Here we have a huge collaboration potential with a memri’s user owned pods integration.
Example query giving you back all transactions for a safe account:
query transactionTimeline {
events(
safeAddress: "0xde374ece6fa50e781e81aac78e811b33d16912c7"
pagination: {
continueAt: "2021-08-13T12:55:10.251Z"
order: DESC
limit: 100
}
types: [CrcHubTransfer CrcMinting Erc20Transfer]
) {
type
value
safe_address
safe_address_profile {
id
firstName
lastName
avatarUrl
circlesAddress
}
transaction_hash
transaction_index
block_number
direction
tags {
id
typeId
value
}
payload {
... on CrcHubTransfer {
from
from_profile {
id
firstName
lastName
avatarUrl
circlesAddress
}
to
to_profile {
id
firstName
lastName
avatarUrl
circlesAddress
}
flow
transfers {
token
from
from_profile {
id
firstName
lastName
avatarUrl
circlesAddress
}
to
to_profile {
id
firstName
lastName
avatarUrl
circlesAddress
}
value
}
}
... on CrcMinting {
token
from
from_profile {
id
firstName
lastName
avatarUrl
circlesAddress
}
to
to_profile {
id
firstName
lastName
avatarUrl
circlesAddress
}
value
}
}
__typename
}
}
Example query giving you back a direct path:
query {
directPath(
from: "0x4a9affa9249f36fd0629f342c182a4e94a13c2e0",
to: "0xde374ece6fa50e781e81aac78e811b33d16912c7",
amount: "1000000"
) {
requestedAmount
flow
transfers {
from
to
value
token
tokenOwner
}
}
}
Provides an event stream with the following aggregates:
CrcBalances
Erc20Balances
Contacts
Memberships
Members
Offers
Sales
Purchases

Events:
CrcSignup
CrcTrust
CrcTokenTransfer
CrcHubTransfer
CrcMinting
EthTransfer
Erc20Transfer
GnosisSafeEthTransfer
ChatMessage
MembershipOffer (Orga)
MembershipAccepted (Orga)
MembershipRejected (Orga)
MemberAdded (Orga)
WelcomeMessage
InvitationCreated
InvitationRedeemed
OrganisationCreated
SaleEvent
SafeVerified
xDAI blockchain gateways
We setup a cloudflare DNS-based load balancer for our own (Nethermind) nodes. Others nodes can be added to the pool.
Accounts and Key creation / recovery
We use as a primary account system gnosis safes, which get deployed to the xdai chain. . Safe Owners, which are controlling the safe, are asymmetric public / private key pairs.
Currently we use the non-custodial social login service from torus for key creation and recovery and plan to extend this with social recovery methods in 2022.
At the moment, we offer the following social logins:
Apple
Google
Github
(mail could be added)
(facebook could be added)
(twitter could be added)
Relayer vs paying yourself
Users can invite each other to the system. Invitation codes are linked to pre-funded EOAs (with each 0,10 xdai). New users can use these invitation-EOAs to set themselves up on the blockchain (create a safe, register at the circle hub etc.) and pay their own transaction fee’s.
Pathfinder
We currently only resolve direct connections between two people (api-query: directPath) and are planning to rewrite a new pathfinder-service with the existing API on top of our blockchain index. A new custom pathfinder is still planned for this year.
Circles Protocol (contracts)
Is used to sign-up at the circles system (either as individual or as organization). Also keeps track of the trust relations and emits the following events: Signup, OrganisationSignup, Trust, HubTransfer.
The hub can “exchange” one circle for another during a “HubTransfer” when the trust relations allow it. It makes sure that people only receive trusted CRC after a HubTransfer completed.
A multi-sig wallet which is used as a user-representation in the circles-system (every user has one safe). These safes are signed-up at the hub either as person or organization.
















Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.