Add federation basis and new coordinator form (#793)

* Add new coordinator entry issue form

* Add Federation basis
This commit is contained in:
Reckless_Satoshi 2023-08-21 18:24:11 +00:00 committed by Reckless_Satoshi
parent 5e4c00c84a
commit 8e0d14b872
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
3 changed files with 430 additions and 6 deletions

View File

@ -0,0 +1,324 @@
name: Coordinator Registration
description: Become a RoboSats Coordinator
title: "[federation]: coordinator 'Alias'"
labels: ["Federation"]
assignees:
- reckless-satoshi
body:
- type: markdown
attributes:
value: |
# Coordinator Registration
This form is for registering a new default coordinator on the RoboSats client. Before proceeding, please review the [RoboSats Federation Basis](https://github.com/RoboSats/robosats/blob/main/federation.md). The Github thread generated by this issue will serve as a communication channel between the development team and the new coordinator, if necessary. The information provided will be used to create a new entry in `frontend/static/federation.json`. If you're technically proficient and wish to expedite the process, you can directly edit `federation.json` via a pull request. Here's a template coordinator:
```json
"temp": {
"longAlias": "Template",
"shortAlias": "temp",
"description": "This is the description for an example coordinator",
"motto": "Don't trust, verify",
"color": "#000000",
"contact": {
"pgp": "keys.openpgp.org/vks/v1/by-fingerprint/....",
"fingerprint": "...",
"email": "contact@contact.com",
"telegram": "examplecoordinator",
"twitter": "examplecoordinator",
"matrix": "#example:matrix.org",
"website": "https://example.coordinator.com",
"simplex": "https://....",
"nostr": "npub....",
"reddit": "u/..."
},
"badges": {
"donatesToDevFund": 20,
},
"policies": {
"Privacy Policy": "...",
"Data Policy": "..."
"Rule #1": "You do not talk about RoboSats Club",
"Rule #2": "You DO NOT talk about RoboSats Club",
},
"mainnet": {
"onion": "http://robosats6tkf3eva7x2voqso3a5wcorsnw34jveyxfqi2fu7oyheasid.onion",
"clearnet": "https://coordinator-address.com"
"i2p": "http:///.........b32.i2p"
},
"testnet": {
"onion": "http://robotestagw3dcxmd66r4rgksb4nmmr43fh77bzn2ia2eucduyeafnyd.onion",
"clearnet": "https://testnet.coordinator-address.com"
"i2p": "http:///.........b32.i2p"
},
"mainnetNodesPubkeys": ["000000000000000000000000000000000000000000000000000000000000000000"],
"testnetNodesPubkeys": ["000000000000000000000000000000000000000000000000000000000000000000"]
```
All fields can be updated or completed later through pull requests. Don't worry about getting everything perfect initially. A partially completed form is better than none. It's okay if your data policy, privacy policy, node ids, and endpoints aren't fully defined or are subject to change.
- type: input
id: alias
attributes:
label: Coordinator Alias
description: What name should the robots refer to you by?
placeholder: e.g. SatsSquare
validations:
required: true
- type: textarea
id: avatar
attributes:
label: Avatar
description: Your coordinator profile picture. Ideally 200x200px.
placeholder: Paste a link to your avatar picture
- type: textarea
id: description
attributes:
label: Description
description: Share something about yourself.
placeholder: Tell us about you, your values, and why you want to coordinate RoboSats.
validations:
required: true
- type: input
id: motto
attributes:
label: Motto
description: A brief phrase to be displayed under your profile picture.
placeholder: e.g. Don't trust, verify.
validations:
required: true
- type: input
id: color
attributes:
label: Color
description: |
A hex RGB color used for accent and easier identification in the RoboSats UI.
placeholder: e.g. "#000000"
validations:
required: false
# Development Funding
- type: markdown
attributes:
value: |
## Development Funding
Donations to the Development Fund (DevFund) are voluntary with no minimum amount. The default donation rate in the Coordinator backend is 20%. The value entered here is for display purposes and can be updated later via a PR. Ideally, it should match the donation rate set in your ``.env`` file. The RoboSats client app randomly sorts coordinators weighted by their DevFund donation value. Thus, the orders of the coordinators that contribute to the development have a higher chance to appear first in the Order book. Coordinators who contribute to the DevFund are more likely to receive support if needed (note that unless the devs are under time constraints support is unlikely to be denied). These patron perks are the way developers say "thank you for your contribution!". The RoboSats development team has an exciting roadmap ahead. However, once RoboSats is decentralized, the only source of funding for further development and maintaining the codebase will be donations (we do not accept venture-capital investments).
- type: input
id: devfund
attributes:
label: DevFund Donations
description: |
What percentage of trade revenue will you donate to the RoboSats Development Fund?
placeholder: e.g. 20%
validations:
required: true
- type: input
id: pgp
attributes:
label: "PGP Public Key and Fingerprint"
description: |
Your permanent identity. If needed, you may have to verify your identity to robots or other coordinators by signing a message.
placeholder: |
e.g. Pubkey repo: https://keys.openpgp.org//vks/v1/by-fingerprint/...
Fingerprint: 1234 5678 90AB CDEF 1234 5678 90AB CDEF 1234
validations:
required: true
# Coordinator Policies
- type: markdown
attributes:
value: |
## Coordinator Policies
The following three sections are designed to inform robots about your service expectations as a coordinator. It's perfectly acceptable to refine your policies over time, as coordinating RoboSats is a learning process. However, remember that robots appreciate clear and concise terms.
- type: textarea
id: privacy-policy
attributes:
label: Privacy Policy
description: |
Describe how you will handle privacy. For example, what kind of evidence will be required in a dispute? How will sensitive information be treated?
placeholder: |
e.g., 1) TLSnotary might be required for evidence submission in disputes. 2) Full user identification may be necessary to verify ownership of the payment method.
validations:
required: true
- type: textarea
id: data-policy
attributes:
label: Data Policy
description: |
Explain your data handling practices. For instance, what is your data retention policy? Will data be shared with third parties? Although a RoboSats coordinator's data collection is limited by design, a coordinator could still learn about users through heuristic analysis, payout node pubkeys, onchain addresses, dispute statements, evidence submission, etc.
placeholder: |
e.g., Data will not be shared or sold to any third party. The database will be cleared every 7 days, except for orders under dispute...
validations:
required: true
- type: textarea
id: other-policies
attributes:
label: Other Policies
description: Any other policies can be set here.
placeholder: |
e.g.
"Rule #1": "You do not talk about RoboSats Club"
"Rule #2": "You DO NOT talk about RoboSats Club"
validations:
required: true
# Coordinator Addresses
- type: markdown
attributes:
value: |
## Coordinator Addresses
Your coordinator API should be publicly accessible via an Onion hidden service. Optionally, you can also expose your API over I2P for redundancy, ensuring robots can still use your service if TOR is under attack. Clearnet endpoints can also be added to your coordinator. You can create new tor2web aliases on services like clearnetonion.eu.org or others (do your own research).
- type: input
id: onion-mainnet
attributes:
label: Onion Mainnet Coordinator Service Address
description: The Onion hidden service where your MAINNET RoboSats coordinator API can be found.
placeholder: e.g. http://robosats6tkf3eva7x2voqso3a5wcorsnw34jveyxfqi2fu7oyheasid.onion
validations:
required: true
- type: input
id: onion-testnet
attributes:
label: Onion Testnet Coordinator Service Address
description: The Onion hidden service where your TESTNET RoboSats coordinator API can be found.
placeholder: e.g. http://robotestagw3dcxmd66r4rgksb4nmmr43fh77bzn2ia2eucduyeafnyd.onion
validations:
required: true
- type: input
id: i2p-mainnet
attributes:
label: I2P Mainnet Coordinator Service Address
description: The I2P service where your MAINNET RoboSats coordinator API can be found (Optional).
placeholder: e.g. http:///.........b32.i2p
validations:
required: false
- type: input
id: i2p-testnet
attributes:
label: I2P Testnet Coordinator Service Address
description: The I2P service where your TESTNET RoboSats coordinator API can be found (Optional).
placeholder: e.g. hhttp:///.........b32.i2p
validations:
required: false
- type: input
id: clearnet-mainnet
attributes:
label: Clearnet Mainnet Coordinator Service Address
description: The Clearnet address where your MAINNET RoboSats coordinator API can be found.
placeholder: e.g. http://mainnet.coordinator.com
validations:
required: false
- type: input
id: clearnet-testnet
attributes:
label: Clearnet Testnet Coordinator Service Address
description: The Clearnet address where your TESTNET RoboSats coordinator API can be found.
placeholder: e.g. http://testnet.coordinator.com
validations:
required: false
# Node Pubkeys
- type: markdown
attributes:
value: |
## Node Pubkeys
Enter your Lightning node pubkeys (also known as node_id). You can enter multiple pubkeys (comma-separated) for both mainnet and testnet. If you haven't created the lightning node yet, enter a placeholder. These pubkeys will be used to direct robots to explorers to find your node (e.g., 1ML or Amboss).
- type: input
id: nodeids-mainnet
attributes:
label: Mainnet Pubkey(s)
description: Mainnet Coordinator Lightning Node Pubkey(s)
placeholder: e.g. "000000000000000000000000000000000000000000000000000000000000000000", "...."
validations:
required: true
- type: input
id: nodeids-testnet
attributes:
label: Testnet Pubkey(s)
description: Testnet Coordinator Lightning Node Pubkey(s)
placeholder: e.g. "000000000000000000000000000000000000000000000000000000000000000000", "...."
validations:
required: true
# Contact Methods
- type: markdown
attributes:
value: |
## Contact Methods
Only one contact method is required, but multiple are preferred. Find a balance between accessibility and operational security (too many contact methods increase the surface area and might harm OpSec).
Contact methods below are sorted by importance.
- type: input
id: email
attributes:
label: "1. email"
description: "Public contact method #1: Email."
placeholder: e.g. contact@example.onion
validations:
required: false
- type: input
id: simplex
attributes:
label: "2. SimpleX"
description: "Public contact method #2: SimpleX"
placeholder: e.g. http://yoursimplexusercontactaddress.....onion
validations:
required: false
- type: input
id: matrix
attributes:
label: "3. Matrix"
description: "Public contact method #3: Matrix."
placeholder: "e.g. #example:matrix.org"
validations:
required: false
- type: input
id: nostr
attributes:
label: "4. Nostr"
description: "Public contact method #4: Website."
placeholder: "e.g. npub..."
validations:
required: false
- type: input
id: website
attributes:
label: "5. Website"
description: "Public contact method #5: Website."
placeholder: "e.g. https//coordinator-alias.com"
validations:
required: false
- type: input
id: telegram
attributes:
label: "6. Telegram"
description: "Public contact method #6: Telegram."
placeholder: "e.g. @tguserhandle"
validations:
required: false
- type: input
id: twitter
attributes:
label: "7. Twitter"
description: "Public contact method #7: Twitter."
placeholder: "e.g. @twitteruser"
validations:
required: false
- type: input
id: reddit
attributes:
label: "8. Reddit"
description: "Public contact method #8: Reddit."
placeholder: "e.g. @reddit"
validations:
required: false
# Federation Basis
- type: markdown
attributes:
value: |
## Federation Basis
- type: checkboxes
id: terms
attributes:
label: RoboSats Federation Basis
description: By submitting this issue, you agree to accept the basis for the [RoboSats Federation Basis](https://github.com/RoboSats/robosats/blob/main/federation.md)
options:
- label: I accept the basis of the RoboSats Federation
required: true

View File

@ -7,12 +7,7 @@ This contributing guide is based on the [Bisq contributing guide](https://github
## Communication Channels
Most communication about RoboSats happens on the main Telegram group. However public community driven support is available in other languages.
* EN [t.me/robosats](https://t.me/robosats) (main)
* ES [t.me/robosats_es](https://t.me/robosats_es)
* RU [t.me/robosats_ru](https://t.me/robosats_ru)
* PT [t.me/robosats_pt](https://t.me/robosats_pt)
* CN [t.me/robosats_cn](https://t.me/robosats_cn)
Most communication about development takes place on our [Matrix Development group](https://matrix.to/#/#robosats:matrix.org).
Discussion about code changes happens in GitHub issues and pull requests.

105
federation.md Normal file
View File

@ -0,0 +1,105 @@
_RoboSats Federation Basis v0.6.0~1_
## Introduction
RoboSats is a Free and Open Source project, anyone can spin up a new RoboSats backend instance. This is in fact ideal, given that the more backend instances there are, the more decentralized RoboSats becomes and the harder it is to stop. However, this decentralization creates some challenges:
1. **Fragmented liquidity** - Spinning up new instances fragments the already thin peer-to-peer market liquidity.
2. **Discovery problems** - It's difficult for users to find and connect to new instances.
3. **Trust issues** - Users may not know whether a coordinator can be trusted. Shady coordinators could potentially scam users.
4. **Lost DevFund revenue** - With decentralized instances, revenue is detached from code development. This results in lost capacity to improve the platform and maintain the codebase.
The **RoboSats Federation aims to solve these 4 key issues!** The Federation is a set of rules that allow multiple RoboSats instances to work together under a unified client app. The federated client app joins the order book of every coordinator, users can seamlessly interact with any coordinator, track the coordinator reputation, verify transparently devFund donations, and more.
The goal is to release the federated app in version **v0.6.0** as the new standard RoboSats client.
## Key Terminology
- **RoboSats** - The peer-to-peer bitcoin exchange app with cool robots.
- **Coordinator** (aka, Host) - The party in charge of allowing matchmaking and communication. Creates the invoices. Maintains the RoboSats backend and lightning infrastructure. Source of trust. Collects the trade revenue and any possible profit. Solves disputes. _You might see the term "Host" being used in the RoboSats app UI for its simplicity instead of "Coordinator"._
- **Federation** - The set of all coordinators of RoboSats.
- **Devs** - Contributors to the RoboSats codebase.
- **DevFund** - Donations used for developing RoboSats.
## How to become a RoboSats Federation Coordinator
### Who can become a RoboSats coordinator in the federation?
**Anyone**. However, bear in mind it's a market, you will need to gain the trust of robots and failing to satisfy users of your instance might exclude you.
### Requirements of a Coordinator
Becoming a RoboSats coordinator is not just "easy passive income" and does require significant knowledge and ongoing effort. Before taking on this role, please ensure you meet the necessary requirements and are prepared for the responsibilities involved.
- Extensive systems administration experience - You will need strong skills in managing servers, networks, docker, kubernetes, etc.
- Expertise running a Lightning node - Hands-on experience with node software like LND or CLN is critical. You will need to be able to configure, monitor, and troubleshoot your node.
- Understanding the regulations in your jurisdiction.
- Solid operational security skills.
- Customer service skills - You will need to provide support to your robots and resolve any issues they encounter. Strong written and verbal communication is key.
- In-depth knowledge of RoboSats - Fully understand how the service works at both a user and technical level. This will allow you to properly manage operations.
A RoboSats coordinator is not too capital intensive. In fact, incoming payments are matched with outgoing payments, so only a small balance is needed to cover channel reserves and some extra. However, if you plan to enable "onchain payouts," more liquidity will be required, and you'll need to become familiar with balancing lightning/onchain.
### What is a coordinator expected to do?
Short list of what a coordinator is expected to do:
- Run RoboSats Coordinator in a production environment.
- Build reputation and gain users trust.
- Keep a well maintained LN node (Note: Sats at risk, Lightning and the RoboSats backend are not hack proof).
- Provide user support for any order hosted by the coordinator backend.
- Solve user disputes fairly and timely.
- Maintain a top OpSec and respect the privacy of the robots.
- Be informed about their jurisdiction regulation.
- Compete with other RoboSats operators on a free market (e.g. compete on fees, user support, transparency, awesomeness, reachability, outreach, etc).
- Earn Sats from trade revenue (stack sats!) for bringing easy and private p2p to the masses!
- Voluntarily stream Sats to the RoboSats devFund to make RoboSats even more awesome.
### How to become part of the Federation and be included in the RoboSats app?
Simply open a new issue in GitHub and select the form "Coordinator Registration". You can **preview the [Coordinator Registration form here](https://github.com/RoboSats/robosats/blob/main/.github/ISSUE_TEMPLATE/coordinator_registration.yaml)** .
Coordinator registrations are **always OPEN** . All fields can be updated or completed later through pull requests. Don't worry about getting everything perfect initially. It's okay if your data policy, privacy policy, node ids, and endpoints aren't fully defined or are subject to change.
### How to run a RoboSats Coordinator?
The easiest way to run a RoboSats coordinator is by using our Docker image releases (see Github Release). That's it, there are no more guides at the moment so it requires a fair bit of technical knowledge as of now. The details of how to wire everything will vary depending on your existing infrastructure. You will find help on our [Matrix Development group](https://matrix.to/#/#robosats:matrix.org).
We are working to release three flavors of pre-configured orchestrations with decent defaults: 1) a well-tested docker-compose orchestration and 2) a [StartOS](https://github.com/Start9Labs/start-os) RoboSats Coordinator App, and lastly 3) an elegant, but little tested, Kubernetes orchestration. The infrastructure-as-code will be open source as well.
### Can a RoboSats coordinator be profitable?
There are many nuances, but the short answer is: Yes.
Bitcoin exchanges are the single biggest revenue makers in the space. In addition, coordinating robosats has low running cost (hardware / energy) and development cost (open source, donation based). There is no reason why coordinating RoboSats would not be profitable even if at a very small scale. A RoboSats coordinator should be able to outcompete in fees any other P2P or centralized exchange and still be profitable.
### What are the risks of running a RoboSats coordinator
Running a Lightning routing node is by itself a risky endeavour. On top of that, think that a RoboSats coordinator will expose to the public many of the critical functionality of your node (e.g., create invoice, pay invoices, send Sats onchain, etc). While the RoboSats backend has been already been in production for a year and a half and many possible exploits have been ironed out already, there is always a chance that 1) new bugs are discovered on your node implementation or 2) malicious actors find exploits on the RoboSats codebase and abuse them instead of reporting them.
As discussed above, a lightning node capable of coordinating hundreds of RoboSats orders in a day does not need much liquidity. In that regard, the funds at risk are relatively low.
### Funding development
Donations to the Development Fund (DevFund) are voluntary with no minimum amount. The default donation rate in the Coordinator backend is 20%, however, you can freely set this value to 0%. Regardless of the amount a coordinator donates for development, all coordinators will be included in the client app.
The coordinators that chose to stick with the default donation rate or higher will get to display a cool badge on their profiles. The RoboSats client app randomly sorts coordinators weighted by their DevFund donation value ([implementation here](https://github.com/RoboSats/robosats/blob/2262dc2af7110e86bb529f5075a19a50e16ade45/frontend/src/utils/federationLottery.ts#L27-L30)). Thus, the orders of the coordinators that contribute to the development have a higher chance to appear first in the Order book. Coordinators who contribute to the DevFund are also more likely to receive support if needed (note that unless the devs are under time constraints support is unlikely to be denied). These patron perks are the way developers say "thank you for your contribution!".
The RoboSats development team has an exciting roadmap ahead. However, once RoboSats is fully decentralized, the only source of funding for further development and maintaining the codebase will be donations (we do not accept venture-capital investments). Some of the exciting roadmap ahead:
- [RoboSats PRO app](https://github.com/RoboSats/robosats/issues/177) (Intended for professional market makers. This client can manage many orders/robots in many coordinators at once.)
- [Onchain private Taproot/MAST contracts](https://github.com/RoboSats/robosats/issues/230)
- Fully functional Android torified App. Eventually, iOS app as well (we'll try :D)
- Keep up to date with Lightning development, overall polishing of UX and improve tooling for coordinators.
### Coordinator Profiles
Each RoboSats coordinator has a profile in the RoboSats app. The profile contains an avatar, a motto, description, coordinator settings, node id, fees, privacy and data policy among others. The coordinator will also be able to cool and colorful badges that should help users distinguish quickly what coordinator they can trust.
**Currently implemented badges**
- Founder - Joined the Federation from the beginning.
- Loved by Robots - Robots leave good reviews online.
- Good OpSecs - Protects his privacy and that of Robots.
- Large Limits - Can host orders with large limits.
- DevFund donator - Donates to the DevFund the default amount or more.
Some of these badges can be objectively measured and awarded. Other badges rely on the subjectivity of the development team. These will be generously awarded and only taken away after a warning.
We also envision more badges in the future, for example milestones by number of trades coordinated (200, 1K, 5K, 25K, 100K, etc).
## Timeline
In a sense the RoboSats federation is already online. New coordinators can gradually join. Eventually, the RoboSats "Experimental" coordinator that is run by the development team will be phased out. The RoboSats Federated client app can be used already in `robotestagw3dcxmd66r4rgksb4nmmr43fh77bzn2ia2eucduyeafnyd.onion`. You can also run a pre-release of the v0.6.0 selfhosted client.
Any coordinator that registers and gets his backend up and running integrated on the RoboSats client app **during 2023 will get the badge reward
verall the [Mash](https://mash.com/consumer-experience/) wallet works end2end with Robosats on both selling & receiging with all details in the notes for the invoices showin. The details of the flows in the app are shown. When the transactions are complete, they open in the mobile app on both sender/receiver sides to highlight that the transactions are completed.The one UX hick-up is that the pending invoices list doesn't explicitly show HOLD invoices (they are filtered), but will open a bug to fix this issue shortly (this note is from Aug 21st 2023).