summaryrefslogtreecommitdiff
path: root/a8/26acaf431f2fbb393a91ceed1f15ddad4fe676
blob: b5114dbb10d0db376c93e228d50ab2cdd232f12d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
Return-Path: <tamas.blummer@gmail.com>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id BDA2BAF0
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Sat, 14 Sep 2019 13:21:32 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com
	[209.85.128.41])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 6BC907D2
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Sat, 14 Sep 2019 13:21:31 +0000 (UTC)
Received: by mail-wm1-f41.google.com with SMTP id q18so5402518wmq.3
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Sat, 14 Sep 2019 06:21:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
	h=to:from:subject:message-id:date:user-agent:mime-version
	:content-transfer-encoding:content-language;
	bh=R9G0PyCQOyGhhHRy4dEZekOOqTKmRTwTMosNEjw+NTY=;
	b=ej+YglunSF6I0bp76fi2cIbPxcVB302zMN+XwSE6p0QbePy+s950IoBzJp/z2Lv/M5
	rArSMWnntuHWB4TDhx3YYyBjESDf96DkYc6EDJJgjt3Ak6eltZNA9oXiq2F0KfoIfOyb
	wqtrgTaJJROHEAYNALmtNutiqvafXXuwQs+z+Vh0GgldjuWZcL8oEqq/ujLks1ZpmUEG
	dWB3Hnp7rwzP8VcabNUtpt+VCubTTAQpFIQ0O9wv4GVoC4BqzYyu4AE8T2oifdh+zXui
	Y0I1dW1Ezla73cjdbL326HIe6qRC8s7P5FFoM/VKNUeesyEDdZmQnrOzSG4sfq34h8VN
	5kXg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:to:from:subject:message-id:date:user-agent
	:mime-version:content-transfer-encoding:content-language;
	bh=R9G0PyCQOyGhhHRy4dEZekOOqTKmRTwTMosNEjw+NTY=;
	b=iENey/pBXt00neQMwIY7kSZ8V+XKjVWljRLUdaTL4SVAMVS0wwVZXoeN/Qw5MJczDL
	6el4BOeUS2tjhIpDr7ryQ/gdApvJQ2gN7GrIw17eUh+/Qu90hyTJX2Mpuri3Y9YoOq/h
	s68LPcEkNLgvjtJA/iVH5BVsWPredgYMIcEdr2pfjkhkvqffakQMrYaCwWvOyq7cgsfg
	N9P/91ZZNQf3kocrXp5e7bkD5GQgTgfMFBwvWepuhM4tGdgWnB9gFPn7inTu7kYzmpC5
	wxmCiI0FcxbbVnsV9snIvrKrruJmdw+eBhdJrUSl9qkeF4d/3yaU5i7CSfayl+mtQZ7F
	vCoQ==
X-Gm-Message-State: APjAAAX11R9BGwV6HiXl78dlPj1oL6ePggu3/uhmR8O7wDMa1+Vz64K0
	X0gkzu5yv0jhoBP32oyVZe7oI3wR4f4=
X-Google-Smtp-Source: APXvYqyjpf+spmLR34BrNPY5eNXoMgcZraF3XC8B7sbgKIzB+dwQdDW6uEIpzvYwyoatcNnO/qpqTw==
X-Received: by 2002:a1c:7004:: with SMTP id l4mr1590290wmc.158.1568467289693; 
	Sat, 14 Sep 2019 06:21:29 -0700 (PDT)
Received: from ?IPv6:2003:dd:6712:6443:8ca4:c919:48c7:7c2a?
	(p200300DD671264438CA4C91948C77C2A.dip0.t-ipconnect.de.
	[2003:dd:6712:6443:8ca4:c919:48c7:7c2a])
	by smtp.gmail.com with ESMTPSA id
	q14sm66896045wrc.77.2019.09.14.06.21.29
	for <bitcoin-dev@lists.linuxfoundation.org>
	(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
	Sat, 14 Sep 2019 06:21:29 -0700 (PDT)
To: bitcoin-dev@lists.linuxfoundation.org
From: Tamas Blummer <tamas.blummer@gmail.com>
Message-ID: <f3d9000a-beef-a10c-5aa4-30bbda966c24@gmail.com>
Date: Sat, 14 Sep 2019 15:21:28 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
	Thunderbird/60.8.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Content-Language: en-US
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM,
	RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
X-Mailman-Approved-At: Tue, 17 Sep 2019 00:03:35 +0000
Subject: [bitcoin-dev] Introcing a side memory network to bitcoin for ads
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Sat, 14 Sep 2019 13:21:32 -0000

I introduced you to the pattern of a side memory to bitcoin in [1] and
promised an implementation of it.

Here you are.

defiads is a side memory network to bitcoin, implemented in Rust, built
on top of rust-bitcoin, murmel, hammersbald, rust-bitcoinconsenus,
rust-wallet, all Rust open source free to grab at
https://github.com/defiads/defiads

defiads builds a peer-to-peer network to distribute textual ads, as
first suggested by ZmnSCPxj[4]. I hope that it will serve 
decentralized finance applications with an infrastructure to distribute
ads, order books, coinjoin proposals etc.

Every defiads node maintains a copy of a network-wide shared 1GB memory
pool of current ads.

An ad is replicated to other nodes as long as there is some bitcoin
locked to it on the bitcoin network. Locking means someone transferred
some sats to an address that is associated with the ad using the
pay-to-contract protocol[2]. The address does not release the bitcoins
until a predefined time span that is the duration of the advertizement,
this is accomplished with OP_CSV. The ad will be evicted from the pool
as soon as the coins locked to it are spendable again.

defiads  ranks advertizements by the ratio of used space divided by
bitcoins locked and will only replicate the top 1GB of this ranked list.

You may read the ads by starting a defiads process of your own and
the query the content through its JSON-RPC API.

You may place ads by performing the following steps, with its JSON-RPC API

1. deposit some bitcoins into your defiads node's wallet
2. prepare an ad, providing its category, abstract and content
3. fund the ad by locking some of the bitcoins to it for a limited term
of the advertizement
4. you may withdraw your coins from the defiads node's wallet after the
advertizement expires

defiads handles the association with ads, locking and unlocking coins.

Implementation notes
defiads connects to both the bitcoin and its own peer-to-peer network.
You do not need to run a bitcoin node as defiadsĀ  only needs a small
fraction of the information on the bictoin blockchain and retrieves that
on its own, as an SPV node. 

The defiads node's wallet is compatibe with that of TREZOR, Ledger,
Greenwallet and many other wallets that support BIP38, BIP44, BIP48,
BIP84 key generation and use standards.

defiads uses Invertible Bloom Lookup Tables[3] to synchronize the ads
pool with its peers.

Status
It seems to work, but you should not yet use with real bitcoins,
therefore by default it connects the bitcoin's test network.

There is no discovery for the network yet, so you will have to know some
peer in the network to see other than your own ads. Write me a direct
email if you'd like to connect to my node.


Future developent
Should the use become popular then 1GB pool become tight, then people
will have to compete for its use. Some might not have enough bitcoin's
to lock and might therefore pay others to lock theirs to fund an
advertizement. defiads network could match both sides and thereby give
rise to bitcoin's first truly risk less interest rate market.

defiads is currently downloading, but not storing, 
the blocks after its birth date. This will no longer be needed once
BIP158 filters are served and committed by Bitcoin Core.

I hope that someone builds a nice UI on top of the JSON RPC as that is
not my area of expertise.

Tamas Blummer

[1] https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-August/017264.html

[2] https://arxiv.org/pdf/1212.3257.pdf

[3] https://arxiv.org/pdf/1101.2245.pdf

[4] https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2019-July/017083.html