Reserved IP Address°C
04-03-2025
BSV
$29.91
Vol 37.71m
-6.65%
BTC
$82070
Vol 48807.86m
-5.04%
BCH
$294.44
Vol 265.89m
-4.46%
LTC
$81.81
Vol 621.63m
-3.88%
DOGE
$0.15
Vol 1670.97m
-7.45%
Getting your Trinity Audio player ready...

This post was first published on Medium.

According to Wikipedia:

pyramid scheme is a business model that recruits members via a promise of payments or services for enrolling others into the scheme, rather than supplying investments or sale of products.

Pyramid Scheme concept

We develop a pyramid scheme based on a smart contract. To join, every participant has to pay a fee to interact with the contract. The contract guarantees the new participant a 100% return¹, as long as he can recruit two more participants. Since the whole pyramid scheme is automatically enforced by smart contract, it is transparent and trustless.

Pyramid Transactions: numbers in red after / denote satoshis
Pyramid Transactions: numbers in red after / denote satoshis

In the example above, Alice has paid a entry fee of x, which entitles her to be the beneficiary in UTXO0. If she convinces Bob and Charlie to join, each paying x, she is guaranteed to be paid 2x, which in turn renews the scheme but with Bob and Charlie as the new beneficiaries. The scheme continues, as long as new investors can be found.

The full code is shown below. Contract Pyramid

Line 15 use ANYONECANPAY so Bob and Charlie can add their inputs independently, each having satoshis².

***

NOTES:

[1] This assumes dust limit is negligible. The first participant earns more than 100% since he only has to pay the transaction fee to deploy the contract.

[2] We ignore transaction fee, which can be easily covered by another input.

Watch: CoinGeek New York panel, BSV vs. Other Blockchains: Differences that Matter for Developers & Businesses

Recommended for you

How AI reshapes programming, building applications
Integrating AI probabilistic thinking with blockchain technology transforms coding practices and sparks a major cultural shift.
April 3, 2025
Developers in Japan can now get hands-on with BSV’s Python SDK
BSV Blockchain Ambassador and YenPoint CEO Ken Sato is co-presenting a session on BSV's Python SDK at Tohoku University on...
March 20, 2025
Advertisement
Advertisement
Advertisement