Skip to content

Commit

Permalink
Howey and some tidies
Browse files Browse the repository at this point in the history
  • Loading branch information
glasgowm148 committed Feb 28, 2023
1 parent fd00751 commit b42af6a
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 26 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@ mkdocs serve

## ToDo

- Tidy and clarify the Multi-Stage contract/transaction pages.

- [x] Make sections on NiPoPoWs more cohesive. (Mining, Scaling, Light Clients)
- Finish moving over ErgoTree specification
- (BUG) Syntax Highlighting not working
- [x] (BUG) Python in multi-code selector boxes seems to have broken.
- [x] (BUG) LaTex commands need refresh to work sometimes. (Preload in Mathjax.js)
- [x] Flesh out & tidy Apps & Use Cases section (new title?)
- [x] Split and tidy scaling page
- Move more research papers into markdown so they are indexed and searchable.
- Transfer over any remaining information from ergonaut.space
- [x] Missing text bottom of modes of operation
- [x] Tidy Light Nodes page (on learn the basics)

- [ ] Tidy and clarify the Multi-Stage contract/transaction pages.
- [ ] Move more research papers into markdown so they are indexed and searchable.
- [ ] Transfer over any remaining information from ergonaut.space
- [ ] Finish moving over ErgoTree specification
19 changes: 13 additions & 6 deletions docs/dev/protocol/autolykos-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,34 @@ Ergo mining is based on Autolykos, a fairly launched efficient ASIC-resistant Pr
[
{
"title": "Start Mining",
"url": "../../mining/setup/join.md"
"url": "../../mining/setup/join.md",
"content": "Getting setup with a mining pool."
},
{
"title": "Algorithm",
"url": "../../mining/algorithm.md"
"url": "../../mining/algorithm.md",
"content": "Dive into the Autolykos Algorithm."
},
{
"title": "Governance",
"url": "../../mining/governance.md"
"url": "../../mining/governance.md",
"content": "PoW To The People"
},
{
"title": "Storage Rent",
"url": "../../mining/rent.md"
"url": "../../mining/rent.md",
"content": "On-chain garbage collection that reduces the problem of blockchain bloat"
},
{
"title": "Difficulty Adjustment",
"url": "../../mining/difficulty.md"
"url": "../../mining/difficulty.md",
"content": "See how the mining difficulty is calculated."

},
{
"title": "Emission",
"url": "../../mining/emission.md"
"url": "../../mining/emission.md",
"content": "The Ergo emission schedule"
},

]
Expand Down
32 changes: 30 additions & 2 deletions docs/dev/stack/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ this address from a mnemonic phrase the following way:
=== "JavaScript"

tbd
tbd


=== "Python"
Expand Down Expand Up @@ -172,7 +172,35 @@ Luckily, our SDKs help you by providing high-level methods for this common task.
=== "JavaScript"

tbd
import { TransactionBuilder, OutputBuilder } from "@fleet-sdk/core";

new TransactionBuilder(creationHeight);

type Box = {
boxId: string;
value: string | bigint;
assets: { tokenId: string; amount: string | bigint }[];
ergoTree: string;
creationHeight: number;
additionalRegisters: NonMandatoryRegisters;
index: number;
transactionId: TransactionId;
};

new TransactionBuilder(creationHeight)
.from(inputs)
.withDataFrom(dataInputs);

new TransactionBuilder(creationHeight)
.from(inputs)
.to(
new OutputBuilder(
"1000000", // amount of nanoergs
"9gNvAv97W71Wm33GoXgSQBFJxinFubKvE6wh2dEhFTSgYEe783j" // recipient address
)
);




=== "Python"
Expand Down
10 changes: 6 additions & 4 deletions docs/mining/difficulty.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Difficulty Adjustment

Ergo uses the **linear least square method** to calculate difficulty. This function is based on the past eight epochs (8x1024 blocks), as described in [this paper](https://eprint.iacr.org/2017/731.pdf) to obtain a target block interval of 120s (2 minutes), on average, during steady-hash.
> You can use the [difficulty & epoch monitor](https://cds.oette.info/ergo_diff.htm) to get an estimate for the next difficulty due.
- [Coin hopping Attack — What after a month of Bitcoin hardfork?](https://medium.com/nikoin/coin-hopping-attack-what-after-a-month-of-bitcoin-hardfork-f5a92151fb7b)

Before [EIP37](eip37.md) Autolykos adjusted slowly in response to fluctuating hashrate, this helped to prevent **adversarial** hopping with a 1.9% error rate compared to bitcoins 9.1% error rate (exponential 10% hash rate growth).
Before [EIP37](eip37.md) Autolykos adjusted slowly in response to fluctuating hashrate, this helped to prevent **adversarial** hopping with a 1.9% error rate compared to bitcoins 9.1%.

This used the **linear least square method** to calculate difficulty. This function was based on the past eight epochs (8x1024 blocks), as described in [this paper](https://eprint.iacr.org/2017/731.pdf) to obtain a target block interval of 120s (2 minutes), on average, during steady-hash.

- [Coin hopping Attack — What after a month of Bitcoin hardfork?](https://medium.com/nikoin/coin-hopping-attack-what-after-a-month-of-bitcoin-hardfork-f5a92151fb7b)

EIP37 was implemented as a big influx of mining hashrate over multiple epochs, especially with super-linear hashrate growth over time (as we seen with the ETH merge) results in huge spike of difficulty. Similarly, few slow epochs may cause huge drop.

You can use the [difficulty & epoch monitor](https://cds.oette.info/ergo_diff.htm) to get an estimate for the next difficulty due.

**Why 2 minutes?**

Expand Down
2 changes: 1 addition & 1 deletion docs/mining/solution-verification.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Solution Verification
# Solution Verification

```
Test Vectors - Ergo:
Expand Down
12 changes: 8 additions & 4 deletions docs/security.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Security
# The Howey Test

The Howey Test is a legal framework used to determine whether a financial instrument, such as the ERG token, is classified as a security. The test has four criteria that must all be met for an instrument to be considered a security: investment of money, common enterprise, reasonable expectation of profits, and entrepreneurial or managerial efforts of others.
The Howey Test is a legal framework used to determine whether a financial instrument, such as the ERG token, is classified as a security. The test has **four criteria** that must all be met for an instrument to be considered a security: ***investment of money, common enterprise, reasonable expectation of profits, and entrepreneurial or managerial efforts of others.***

In the case of ERG tokens, they are regularly traded on cryptocurrency exchanges. They can be mined by purchasing hardware and paying for electricity, which suggests that the first and second criteria of the Howey Test may be met. However, the promotion of the ERG tokens within the Platform is to improve security and functionality through proof-of-work mining and the advancement of the [eUTXO](eutxo.md) system rather pitched as an investment with a reasonable expectation of profits. Additionally, the original developers of the Platform and the Foundation have not taken steps to increase the market value of ERG tokens or sell them to investors as an investment. Therefore, it is likely that the third criterion of the Howey Test is not met.
In the case of ERG tokens, they are regularly traded on cryptocurrency exchanges. They can be mined by purchasing hardware and paying for electricity, which suggests that **the first and second criteria of the Howey Test may be met**. However, the promotion of the ERG tokens within the Platform is to improve security and functionality through proof-of-work mining, and the advancement of the [eUTXO](eutxo.md) system rather pitched as an investment with a reasonable expectation of profits. Additionally, the original Platform and Foundation developers have not taken steps to increase the market value of ERG tokens or sell them to investors as an investment. **Therefore, it is likely that the third criterion of the Howey Test is not met.**

The fourth criterion, entrepreneurial or managerial efforts of others, requires that the efforts of those outside the investor are essential to the success or failure of the enterprise. While the Foundation currently plays a role in the development and functionality of the Platform, the ERG tokens ecosystem is becoming more decentralized and independent of the Foundation or any other centralized entity. The Platform is open source and permissionless, allowing anyone to build applications or launch tokens without the permission or assistance of the Foundation. This decentralization will increase over time as more third-party developers bring value to the Platform. The Foundation community-led and has went to great efforts to inform and encourage discussion with the community. If the foundation were to vanish, development would not need to stop, and miners could extract and spend all of the Foundation's funds through storage rent. Therefore, it is difficult to argue that the success of the Platform and the value of ERG tokens necessarily rely on the Foundation or its members. Overall, the value of ERG tokens is becoming more market-driven and independent of the Foundation, which suggests that the fourth criterion of the Howey Test is not met. As a result, ERG tokens should not be considered securities for federal securities law purposes.
The fourth criterion, entrepreneurial or managerial efforts of others, requires that the efforts of those outside the investor are essential to the success or failure of the enterprise. While the Foundation currently plays a role in the development and functionality of the Platform, the ERG tokens ecosystem is becoming more decentralised and independent of the Foundation or any other centralised entity. The Platform is open source and permissionless, allowing anyone to build applications or launch tokens without the permission or assistance of the Foundation.

This decentralisation will increase over time as more third-party developers bring value to the Platform. The Foundation is community-led and has made great efforts to inform and encourage discussion with the community. If the foundation were to vanish, development would not need to stop, and miners could extract and spend all of the Foundation's funds through storage rent. Therefore, it is difficult to argue that the success of the Platform and the value of ERG tokens necessarily rely on the Foundation or its members. Overall, the value of ERG tokens is becoming [more market-driven and independent of the Foundation](ergo-foundation-2022.md), which suggests that **the fourth criterion of the Howey Test is not met.**

As a result, ERG tokens should not be considered securities for federal securities law purposes.
7 changes: 4 additions & 3 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ nav:
- Social Contract: social_contract.md
- Audit: dev/protocol/audit.md
- Transparency Report: ergo-foundation-2022.md
- The Howey Test: security.md
- EIPs: dev/protocol/eip.md

- Miners:
Expand Down Expand Up @@ -474,12 +475,12 @@ nav:
- Bonds:
- SigmaFi: eco/sigmafi.md
- Bonding Curve: uses/bonding.md
- Options:
- uses/options.md
- SigmaO: eco/sigmao.md
- Derivatives:
- uses/deriv.md
- Tensile: eco/tensile.md
- Options:
- uses/options.md
- SigmaO: eco/sigmao.md
- CrowdFunding:
- uses/crowdfunding.md
- ErgoRaffle: eco/ergoraffle.md
Expand Down

0 comments on commit b42af6a

Please sign in to comment.