# Upcoming token sale for Circles

**URL:** <https://forum.aboutcircles.com/t/upcoming-token-sale-for-circles/381>\
**Category:** Circles general\
**Created:** [March 23, 2021, 9:15am UTC](https://forum.aboutcircles.com/t/upcoming-token-sale-for-circles/381 "2021-03-23T09:15:50Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![martin\_koeppelmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.aboutcircles.com/martin_koeppelmann/32/313_2.png) [@martin\_koeppelmann](https://forum.aboutcircles.com/u/martin_koeppelmann)\
**Post date:** [March 23, 2021, 9:15am UTC](https://forum.aboutcircles.com/t/upcoming-token-sale-for-circles/381/1 "2021-03-23T09:15:50Z")

</div>

There is a project out there (will share the name when confirmed) that is intending to do a token sale. Most of the tokens will be sold for xDAI via a auction - but currently the idea is to sell some of the token for Circles.

While I was initially exploring the idea of using [Group Currencies](https://aboutcircles.com/t/group-currencies/358/7) for this, there seems to be a simpler way: There can be an “organisational wallet” that can trust a number of Circles accounts. The project would set up this account. They would announce how much of their tokens they are willing to sell for Circles: e.g. 100.000 tokens. Now they would need to define a sales period (e.g. 1 week). During this week anyone can send Circles (directly if directly trusted or transitive otherwise) to this wallet via the regular circles.garden interface.

At the end of the sales period the tokens are distributed evenly to all sales participants. E.g. of in total 20.000 Circles were raised it would mean that everyone who send Circles would receive 5 tokens per Circles they send.

To make this happen:

1. TheGraph, pathfinder and Circles.garden needs to support organizational wallets.
2. Somehow the project needs to come up with a list of Circles they accept. Note that this also limits the numbers of Circles they can theoretically receive at max. Since Circles is only a few month old each Circles account has only ~1000 Circles in existence. So if they trust 10 accounts the maximum number of Circles they could receive would be 10,000. To not have that a limiting factor they should probably at least trust 1000 accounts.

My suggestion would be to start with 5-20 manually selected/ verified accounts and then do a graph analysis. E.g. “median graph distance” to those 5-20 starting points and select the 1000 nodes that are closest in the graph.

@alculexum or Christian R. - would that be something you could do with your tooling? (create a list of something like the 1000 most trusted Circles accounts?)

---

<div class="post-metadata">

**Author:** ![chriseth](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@chriseth](https://forum.aboutcircles.com/u/chriseth)\
**Post date:** [March 23, 2021, 11:00pm UTC](https://forum.aboutcircles.com/t/upcoming-token-sale-for-circles/381/2 "2021-03-23T23:00:42Z")

</div>

This sounds like a very interesting project!

I made some analyses on the graph. The results are still very preliminary, though. The graph I considered was the graph between accounts who trust each other in both directions.

Then I selected an account at random and computed the set of reachable accounts in rounds until there were more than 10000 accounts.

I repeated this 100 times and printed all accounts that occurred at least 25 times.

In other words, I computed the set of accounts that have a 25% probability to be among the ~10000 closest accounts to randomly selected accounts.

This resulted in about 2000 accounts and was more or less stable: The output of two runs of the program coincided on about 80-90% of the accounts.

I spot-checked 20-30 accounts from that list, but none of the accounts nor any of their direct neighbours looked familiar to me. Some, if not most of them rather looked like fake accounts, but I might be mistaken there.

Maybe we can do the same starting from a specific set of accounts and see what we get.

---

<div class="post-metadata">

**Author:** ![alculexum](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.aboutcircles.com/alculexum/32/108_2.png) [@alculexum](https://forum.aboutcircles.com/u/alculexum)\
**Post date:** [March 24, 2021, 2:06pm UTC](https://forum.aboutcircles.com/t/upcoming-token-sale-for-circles/381/3 "2021-03-24T14:06:18Z")

</div>

Can you share the final resulting list? Then I could see if Cypher statements on the GraphDB give similar results.

---

<div class="post-metadata">

**Author:** ![chriseth](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@chriseth](https://forum.aboutcircles.com/u/chriseth)\
**Post date:** [March 24, 2021, 3:43pm UTC](https://forum.aboutcircles.com/t/upcoming-token-sale-for-circles/381/4 "2021-03-24T15:43:05Z")

</div>

Here you are:

> **[HackMD - Collaborative Markdown Knowledge Base](https://hackmd.io/s/rJVapRd4u)**
>
> 0x0020cE7777f6395746E950AB3365d5Ca4c52ed49 0x005397FDdFb5dB9D710FDE4Ebba970399a349a02 0x005B3Dbc30bd

> **[HackMD - Collaborative Markdown Knowledge Base](https://hackmd.io/s/Sy6gRAOVd)**
>
> 0x00190570480C0c32cb73df3BcA281cC53e1Cf0BC 0x0020cE7777f6395746E950AB3365d5Ca4c52ed49 0x005397FDdFb5

---

<div class="post-metadata">

**Author:** ![alculexum](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.aboutcircles.com/alculexum/32/108_2.png) [@alculexum](https://forum.aboutcircles.com/u/alculexum)\
**Post date:** [March 25, 2021, 7:18am UTC](https://forum.aboutcircles.com/t/upcoming-token-sale-for-circles/381/5 "2021-03-25T07:18:16Z")

</div>

Thanks, I did only a very quick analysis and I saw the same phenomenon: there seem to be huge Circles which are kind of isolated. So the approach probably doesn’t work. Maybe the “start-with-well-known-accounts” approach and then iterating the hops until enough accounts (with mutual trusts?) are found?

---

<div class="post-metadata">

**Author:** ![martin\_koeppelmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.aboutcircles.com/martin_koeppelmann/32/313_2.png) [@martin\_koeppelmann](https://forum.aboutcircles.com/u/martin_koeppelmann)\
**Post date:** [March 25, 2021, 8:28am UTC](https://forum.aboutcircles.com/t/upcoming-token-sale-for-circles/381/6 "2021-03-25T08:28:00Z")

</div>

Here is an alternative strategy to come up with a list of e.g. 1000 accounts.

The project that is doing the sell (or in general any vendor that is expecting to sell something for large quantities of Circles) should manually select n trusted accounts. Those should be accounts where they expect that there is some chance that they might later be able to buy something from the person - generally speaking people they interact with.

Those n trusted accounts are likely to little as selecting _n_ accounts limits the total number of Circles you can receive to _n_ \*Circles per account. So the correct strategy would be to accept other Circles that are most likely to be spendable against those n accounts. The strategy to calculate this is:

1. create an organizational wallet _o_ and trust those _n_ accounts
2. iterate over all other Circles accounts:  
a) set the balance of that Circles account temporarily to infinity  
b) check how much of those (personal) Circles are spendable against _o_  
c) this will result in a number (trust distance) between 0 and _n_ \* Circles per account
3. select the top _m_ (e.g. 1000) accounts that score the highest _trust distance_

If it is not feasible to calculate the _trust distance_ for all Circles accounts a simple strategy might be used to calculate it only for the “most promising accounts” - e.g.: start with all accounts that are reachable with 1 hop from the _n_ accounts, 2 hops, …

---

<div class="post-metadata">

**Author:** ![chriseth](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@chriseth](https://forum.aboutcircles.com/u/chriseth)\
**Post date:** [March 25, 2021, 11:28am UTC](https://forum.aboutcircles.com/t/upcoming-token-sale-for-circles/381/7 "2021-03-25T11:28:06Z")

</div>

Here is another hackmd that contains all accounts with bidirectional trust distance at most 3 to @martin_koeppelmann :

> **[HackMD - Collaborative Markdown Knowledge Base](https://hackmd.io/s/HJsEXe5Vd)**
>
> \## Accounts with bidirectional trust distance at most 3 to Martin K. 0x00247Ce578622C16c8DdC942458A

After creating these three hackmds, I realized that I incorrectly included trust connections with trust percentage zero, somehow such edges appear in the database.

---

<div class="post-metadata">

**Author:** ![chriseth](https://avatars.discourse-cdn.com/v4/letter/c/c6cbf5/32.png) [@chriseth](https://forum.aboutcircles.com/u/chriseth)\
**Post date:** [March 25, 2021, 11:28am UTC](https://forum.aboutcircles.com/t/upcoming-token-sale-for-circles/381/8 "2021-03-25T11:28:50Z")

</div>

Oh and there is a significant overlap between the initial two sets and this third set, so I fear that the first two sets are not really isolated.

---

<div class="post-metadata">

**Author:** ![alculexum](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.aboutcircles.com/alculexum/32/108_2.png) [@alculexum](https://forum.aboutcircles.com/u/alculexum)\
**Post date:** [April 1, 2021, 10:21am UTC](https://forum.aboutcircles.com/t/upcoming-token-sale-for-circles/381/9 "2021-04-01T10:21:55Z")

</div>

I created a Cypher statement which (hopefully) returns:

> Find all Users trusted via 1…3 hops by Martin with all trusts \> 0 (so currently trusted).

This results in these 2800 Users: [https://gist.githubusercontent.com/ice09/87509a1ecafd9ddd73e02c6ebc5b005d/raw/aaf813ac80957133454f65d7663a080224653667/users\_trusted\_by\_Martin.csv](https://gist.githubusercontent.com/ice09/87509a1ecafd9ddd73e02c6ebc5b005d/raw/aaf813ac80957133454f65d7663a080224653667/users_trusted_by_Martin.csv)

Hope that helps.

Query:

```
MATCH path = (tr:User {name:'Martin'})-[t:TRUSTS*1..3]->(te:User)
WHERE ALL(r IN relationships(path) WHERE r.amount > 0)
RETURN DISTINCT(te)`

```

---

<div class="post-metadata">

**Author:** ![martin\_koeppelmann](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.aboutcircles.com/martin_koeppelmann/32/313_2.png) [@martin\_koeppelmann](https://forum.aboutcircles.com/u/martin_koeppelmann)\
**Post date:** [April 1, 2021, 12:48pm UTC](https://forum.aboutcircles.com/t/upcoming-token-sale-for-circles/381/10 "2021-04-01T12:48:17Z")

</div>

Thank you Alex - this is a good start.  
The weakness of that query is that it is susceptible to fairly simply attacks - it does not consider a more complex measure of “connectives”. Consider the following example:

Just one attacker A (or just not so careful person that might too easily give away trust) can introduce unlimited accounts with a “hop 3 distance”. In reality the total amounts of Circles that can be spend from all the “fake accounts” on the right side is however limited to the Circles A holds (as A is the only path between the 2 clusters). So ideally the distance measure takes those things into account.

Again - in my very first post I tried to describe that - that we should take into account the total amount of Circles a person can spend as a distance measure. In this graph that would be a small number for all the accounts on the right and larger for all the accounts on the left despite the “hop distance” being equal.

 ![Screen Shot 2021-04-01 at 14.44.05](https://europe1.discourse-cdn.com/flex013/uploads/aboutcircles/original/1X/ee9fa19606a4a10d5cd4dd7ca021824683b17be0.jpeg)

---

<div class="post-metadata">

**Author:** ![alculexum](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.aboutcircles.com/alculexum/32/108_2.png) [@alculexum](https://forum.aboutcircles.com/u/alculexum)\
**Post date:** [April 1, 2021, 3:21pm UTC](https://forum.aboutcircles.com/t/upcoming-token-sale-for-circles/381/11 "2021-04-01T15:21:30Z")

</div>

Finally the drawing helped me understanding that approach!

Ok, makes sense to me, I can only do this in a “static” way as I initially misunderstood the amount as a real amount and not percentage - the DB has no clue of real balances of the users. However, being more than 50 means more than one connections must exists if I get this correctly. So this would be my take:

> Find all Users who trust Martin with 1 to 3 hops, do not consider self-trust, and display the max accumulated amount of trust for each User (amount here being percentage of balance)

With this result: [https://gist.githubusercontent.com/ice09/87509a1ecafd9ddd73e02c6ebc5b005d/raw/8b23e325b11d35358fa1ced2de3aff2ddaa9fb2a/users\_who\_trust\_Martin\_max\_distance.csv](https://gist.githubusercontent.com/ice09/87509a1ecafd9ddd73e02c6ebc5b005d/raw/8b23e325b11d35358fa1ced2de3aff2ddaa9fb2a/users_who_trust_Martin_max_distance.csv)

Query:

```
MATCH path = (tr:User)-[t:TRUSTS*1..3]->(te:User {name:"Martin"})
WHERE ALL(r IN relationships(path) WHERE r.amount > 0 AND NOT (startNode(r) = endNode(r)))
RETURN distinct(tr), (max(reduce(totalAmt = 0, t IN relationships(path) | totalAmt + t.amount))) as maxamt
ORDER BY maxamt DESC

```
