@@ -0,0 +1,65 @@
1++++
2+title = "eth-provider: Decentralized Ethereum access for Urbit"
3+date = "2022-03-04"
4+
5+[taxonomies]
6+grant_type = [ "Bounty" ]
7+grant_category = [ "App Dev" ]
8+
9+[extra]
10+image = ""
11+description = "Eth-provider is a Gall agent that allows Urbit users to configure their Ethereum connection."
12+reward = "$30,000 in WSTR"
13+assignee = ""
14+id = ""
15+completed = false
16+work_request_link="https://airtable.com/shr4qt9t9kz7RaOIa?prefill_Grant+ID=B0142&prefill_Grant+Name=Ethereum%20Provider"
17++++
18+
19+## Background
20+
21+A common criticism of the Ethereum ecosystem is the reliance on centralized services such as Infura. Currently all Urbit ships communicate to Ethereum through the Tlon Infura endpoint at eth-mainnet.urbit.org, serving approximately 600k requests per day. This is a practical choice, but Urbit provides the building blocks for a more decentralized solution.
22+
23+## Bounty Description
24+
25+The end goal of this bounty is to build a Gall agent called the eth-provider that allows a ship to configure their ethereum connection. The default behavior of the eth-provider is to use the current tlon Infura endpoint, but it can also be configured to use a different URL. More interestingly, it should also have the capability to be configured as a provider or a client.
26+
27+A provider allows other ships, explicitly allowed through a whitelist, to connect their ethereum calls to the provider. A client is the opposite, connecting to another ship to receive ethereum responses. These modes allow us to leverage the Urbit identity system to provide for more fine-grained and robust access control than on the old Internet.
28+
29+A star is a natural fit to run a provider, so in addition to the whitelist there should be a configuration option to allow the kids of the ship to connect.
30+
31+The user of the eth-provider should not need to care how it is configured, the pokes should return the same data whether the eth-provider is configured to local, provider or client mode.
32+
33+Building the eth-provider is simplified by the extensive Ethereum JSON RPC capabilities in /lib/ethereum and /lib/ethio. Integrating the eth-provider with the existing urbit codebase may require implementing a thread like /lib/ethio that calls the eth-provider.
34+
35+## Resources
36+
37+[/lib/ethereum](https://github.com/urbit/urbit/blob/master/pkg/base-dev/lib/ethereum.hoon)
38+
39+[/lib/ethio](https://github.com/urbit/urbit/blob/master/pkg/base-dev/lib/ethio.hoon)
40+
41+## Project Requirements
42+
43+- Ships can poke the eth-provider with ethereum rpc calls and receive ethereum rpc responses.
44+- Ships can configure the eth-provider as local, provider or client.
45+ - If configured as local, you can configure a custom ethereum url or use the default tlon Infura endpoint.
46+ - If configured as a provider, you can whitelist other ships that can connect to the provider as clients. There should also be an option to allow all kids of the ship to connect.
47+ - If configured as a client, the eth-provider will forward the ethereum rpc calls to the provider.
48+- The user of the eth-provider should not need to care how it is configured, the pokes and responses should be identical for any configuration
49+- The final milestone of this bounty is to integrate the urbit codebase to use the eth-provider. These include /app/eth-watcher and /app/eth-sender.
50+
51+## Architecture Diagram
52+
53+
54+
55+## Milestones
56+
57+### Eth-provider Gall agent
58+
59+$20,000 WSTR
60+A completed eth-provider Gall agent that satifsfies the project requirements above.
61+
62+### Urbit codebase integration
63+
64+$10,000 WSTR
65+All Ethereum RPC calls in the urbit codebase have been migrated to use eth-provider instead of the direct Infura connection. This milestone is completed when a PR against the [urbit](https://github.com/urbit/urbit) repository has been merged.