Initial commit: anal fisting > pipeline punch

This commit is contained in:
crappyrules
2025-10-05 00:13:22 -04:00
commit 312d82eb58
25 changed files with 5750 additions and 0 deletions
+463
View File
@@ -0,0 +1,463 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @title PoWHD Style Pyramid Contract
* @dev Educational example showing how pyramid schemes work on Ethereum
* WARNING: This is for educational purposes only. Pyramid schemes are illegal in many jurisdictions.
*/
contract PoWHDExample {
/*=================================
= MODIFIERS =
=================================*/
// Only people with tokens
modifier onlyBagholders() {
require(myTokens() > 0);
_;
}
// Only people with profits
modifier onlyStronghands() {
require(myDividends(true) > 0);
_;
}
/*==============================
= EVENTS =
==============================*/
event onTokenPurchase(
address indexed customerAddress,
uint256 incomingEthereum,
uint256 tokensMinted,
address indexed referredBy
);
event onTokenSell(
address indexed customerAddress,
uint256 tokensBurned,
uint256 ethereumEarned
);
event onReinvestment(
address indexed customerAddress,
uint256 ethereumReinvested,
uint256 tokensMinted
);
event onWithdraw(
address indexed customerAddress,
uint256 ethereumWithdrawn
);
/*=====================================
= CONFIGURABLES =
=====================================*/
string public name = "PoWHD";
string public symbol = "P3D";
uint8 constant public decimals = 18;
uint8 constant internal dividendFee_ = 10; // 10% dividend fee
uint8 constant internal referralFee_ = 3; // 3% referral fee
uint256 constant internal tokenPriceInitial_ = 0.0000001 ether;
uint256 constant internal tokenPriceIncremental_ = 0.00000001 ether;
uint256 constant internal magnitude = 2**64;
/*================================
= DATASETS =
================================*/
// Amount of tokens for each address (scaled number)
mapping(address => uint256) internal tokenBalanceLedger_;
mapping(address => uint256) internal referralBalance_;
mapping(address => int256) internal payoutsTo_;
uint256 internal tokenSupply_ = 0;
uint256 internal profitPerShare_;
/*=======================================
= PUBLIC FUNCTIONS =
=======================================*/
/**
* Converts all incoming ethereum to tokens for the caller, and passes down the referral address (if any)
*/
function buy(address _referredBy) public payable returns(uint256) {
purchaseTokens(msg.value, _referredBy);
}
/**
* Fallback function to handle ethereum that was sent straight to the contract
* Unfortunately we cannot use a referral address this way.
*/
receive() external payable {
purchaseTokens(msg.value, address(0));
}
/**
* Converts all of caller's dividends to tokens.
*/
function reinvest() onlyStronghands() public {
// Fetch dividends
uint256 _dividends = myDividends(false); // retrieve ref. bonus later in the code
// Pay out the dividends virtually
address _customerAddress = msg.sender;
payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude);
// Retrieve ref. bonus
_dividends += referralBalance_[_customerAddress];
referralBalance_[_customerAddress] = 0;
// Dispatch a buy order with the virtualized "withdrawn" dividends
uint256 _tokens = purchaseTokens(_dividends, address(0));
// Fire event
emit onReinvestment(_customerAddress, _dividends, _tokens);
}
/**
* Alias of sell() and withdraw().
*/
function exit() public {
// Get token count for caller & sell them all
address _customerAddress = msg.sender;
uint256 _tokens = tokenBalanceLedger_[_customerAddress];
if(_tokens > 0) sell(_tokens);
// Withdraw dividends
withdraw();
}
/**
* Withdraws all of the callers earnings.
*/
function withdraw() onlyStronghands() public {
// Setup data
address _customerAddress = msg.sender;
uint256 _dividends = myDividends(false); // get ref. bonus later in the code
// Update dividend tracker
payoutsTo_[_customerAddress] += (int256) (_dividends * magnitude);
// Add ref. bonus
_dividends += referralBalance_[_customerAddress];
referralBalance_[_customerAddress] = 0;
// Delivery service
payable(_customerAddress).transfer(_dividends);
// Fire event
emit onWithdraw(_customerAddress, _dividends);
}
/**
* Liquifies tokens to ethereum.
*/
function sell(uint256 _amountOfTokens) onlyBagholders() public {
// Setup data
address _customerAddress = msg.sender;
// Russian hackers BTFO
require(_amountOfTokens <= tokenBalanceLedger_[_customerAddress]);
uint256 _tokens = _amountOfTokens;
uint256 _ethereum = tokensToEthereum_(_tokens);
uint256 _dividends = SafeMath.div(_ethereum, dividendFee_);
uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends);
// Burn the sold tokens
tokenSupply_ = SafeMath.sub(tokenSupply_, _tokens);
tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _tokens);
// Update dividends tracker
int256 _updatedPayouts = (int256) (profitPerShare_ * _tokens + (_taxedEthereum * magnitude));
payoutsTo_[_customerAddress] -= _updatedPayouts;
// Dividing by zero is a bad idea
if (tokenSupply_ > 0) {
// Update the amount of dividends per token
profitPerShare_ = SafeMath.add(profitPerShare_, (_dividends * magnitude) / tokenSupply_);
}
// Fire event
emit onTokenSell(_customerAddress, _tokens, _taxedEthereum);
}
/*==========================================
= INTERNAL FUNCTIONS =
==========================================*/
function purchaseTokens(uint256 _incomingEthereum, address _referredBy) internal returns(uint256) {
// Data setup
address _customerAddress = msg.sender;
uint256 _undividedDividends = SafeMath.div(_incomingEthereum, dividendFee_);
uint256 _referralBonus = SafeMath.div(_undividedDividends, referralFee_);
uint256 _dividends = SafeMath.sub(_undividedDividends, _referralBonus);
uint256 _taxedEthereum = SafeMath.sub(_incomingEthereum, _undividedDividends);
uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum);
uint256 _fee = _dividends * magnitude;
// No point in continuing execution if OP is a poor russian hacker
// Prevents overflow in the case that the pyramid somehow magically starts being used by everyone in the world
require(_amountOfTokens > 0 && (SafeMath.add(_amountOfTokens,tokenSupply_) > tokenSupply_));
// Is the user referred by a masternode?
if(_referredBy != address(0) && _referredBy != _customerAddress && tokenBalanceLedger_[_referredBy] >= 100e18) {
// Wealth redistribution
referralBalance_[_referredBy] = SafeMath.add(referralBalance_[_referredBy], _referralBonus);
} else {
// No ref purchase
// Add the referral bonus back to the global dividends cake
_dividends = SafeMath.add(_dividends, _referralBonus);
_fee = _dividends * magnitude;
}
// We can't give people infinite ethereum
if(tokenSupply_ > 0){
// Add tokens to the pool
tokenSupply_ = SafeMath.add(tokenSupply_, _amountOfTokens);
// Take the amount of dividends gained through this transaction, and allocates them evenly to each shareholder
profitPerShare_ += (_dividends * magnitude / (tokenSupply_));
// Calculate the amount of tokens the customer receives over his purchase
_fee = _fee - (_fee-(_amountOfTokens * (_dividends * magnitude / (tokenSupply_))));
} else {
// Add tokens to the pool
tokenSupply_ = _amountOfTokens;
}
// Update circulating supply & the ledger address for the customer
tokenBalanceLedger_[_customerAddress] = SafeMath.add(tokenBalanceLedger_[_customerAddress], _amountOfTokens);
// Tells the contract that the buyer doesn't deserve dividends for the tokens before they owned them;
//really i know you think you do but you don't
int256 _updatedPayouts = (int256) ((profitPerShare_ * _amountOfTokens) - _fee);
payoutsTo_[_customerAddress] += _updatedPayouts;
// Fire event
emit onTokenPurchase(_customerAddress, _incomingEthereum, _amountOfTokens, _referredBy);
return _amountOfTokens;
}
/**
* Calculate Token price based on an amount of incoming ethereum
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/
function ethereumToTokens_(uint256 _ethereum) internal view returns(uint256) {
uint256 _tokenPriceInitial = tokenPriceInitial_ * 1e18;
uint256 _tokensReceived =
(
(
// Underflow attempts BTFO
SafeMath.sub(
(sqrt
(
(_tokenPriceInitial**2)
+
(2*(tokenPriceIncremental_ * 1e18)*(_ethereum * 1e18))
+
(((tokenPriceIncremental_)**2)*(tokenSupply_**2))
+
(2*(tokenPriceIncremental_)*_tokenPriceInitial*tokenSupply_)
)
), _tokenPriceInitial
)
)/(tokenPriceIncremental_)
)-(tokenSupply_)
;
return _tokensReceived;
}
/**
* Calculate token sell value.
* It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation;
* Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code.
*/
function tokensToEthereum_(uint256 _tokens) internal view returns(uint256) {
uint256 tokens_ = (_tokens + 1e18);
uint256 _tokenSupply = (tokenSupply_ + 1e18);
uint256 _etherReceived =
(
// Underflow attempts BTFO
SafeMath.sub(
(
(
(
tokenPriceInitial_ +(tokenPriceIncremental_ * (_tokenSupply/1e18))
)-tokenPriceIncremental_
)*(tokens_ - 1e18)
),(tokenPriceIncremental_*((tokens_**2-tokens_)/1e18))/2
)
/1e18);
return _etherReceived;
}
/*===========================================
= HELPERS AND CALCULATORS =
===========================================*/
/**
* Method to view the current Ethereum stored in the contract
* Example: totalEthereumBalance()
*/
function totalEthereumBalance() public view returns(uint256) {
return address(this).balance;
}
/**
* Retrieve the total token supply.
*/
function totalSupply() public view returns(uint256) {
return tokenSupply_;
}
/**
* Retrieve the tokens owned by the caller.
*/
function myTokens() public view returns(uint256) {
address _customerAddress = msg.sender;
return balanceOf(_customerAddress);
}
/**
* Retrieve the dividends owned by the caller.
* If `_includeReferralBonus` is set to 1/true, the referral bonus will be included in the calculations.
* The reason for this, is that in the frontend, we will want to get the total divs (global + ref)
* But in the internal calculations, we want them separate.
*/
function myDividends(bool _includeReferralBonus) public view returns(uint256) {
address _customerAddress = msg.sender;
return _includeReferralBonus ? dividendsOf(_customerAddress) + referralBalance_[_customerAddress] : dividendsOf(_customerAddress);
}
/**
* Retrieve the token balance of any single address.
*/
function balanceOf(address _customerAddress) public view returns(uint256) {
return tokenBalanceLedger_[_customerAddress];
}
/**
* Retrieve the dividend balance of any single address.
*/
function dividendsOf(address _customerAddress) public view returns(uint256) {
return (uint256) ((int256)(profitPerShare_ * tokenBalanceLedger_[_customerAddress]) - payoutsTo_[_customerAddress]) / magnitude;
}
/**
* Return the buy price of 1 individual token.
*/
function sellPrice() public view returns(uint256) {
// Our calculation relies on the token supply, so we need supply. Doh.
if(tokenSupply_ == 0){
return tokenPriceInitial_ - tokenPriceIncremental_;
} else {
uint256 _ethereum = tokensToEthereum_(1e18);
uint256 _dividends = SafeMath.div(_ethereum, dividendFee_ );
uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends);
return _taxedEthereum;
}
}
/**
* Return the sell price of 1 individual token.
*/
function buyPrice() public view returns(uint256) {
// Our calculation relies on the token supply, so we need supply. Doh.
if(tokenSupply_ == 0){
return tokenPriceInitial_ + tokenPriceIncremental_;
} else {
uint256 _ethereum = tokensToEthereum_(1e18);
uint256 _dividends = SafeMath.div(_ethereum, dividendFee_ );
uint256 _taxedEthereum = SafeMath.add(_ethereum, _dividends);
return _taxedEthereum;
}
}
/**
* Function for the frontend to dynamically retrieve the price scaling of buy orders.
*/
function calculateTokensReceived(uint256 _ethereumToSpend) public view returns(uint256) {
uint256 _dividends = SafeMath.div(_ethereumToSpend, dividendFee_);
uint256 _taxedEthereum = SafeMath.sub(_ethereumToSpend, _dividends);
uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum);
return _amountOfTokens;
}
/**
* Function for the frontend to dynamically retrieve the price scaling of sell orders.
*/
function calculateEthereumReceived(uint256 _tokensToSell) public view returns(uint256) {
require(_tokensToSell <= tokenSupply_);
uint256 _ethereum = tokensToEthereum_(_tokensToSell);
uint256 _dividends = SafeMath.div(_ethereum, dividendFee_);
uint256 _taxedEthereum = SafeMath.sub(_ethereum, _dividends);
return _taxedEthereum;
}
/*==========================================
= INTERNAL FUNCTIONS =
==========================================*/
function sqrt(uint x) internal pure returns (uint y) {
uint z = (x + 1) / 2;
y = x;
while (z < y) {
y = z;
z = (x / z + z) / 2;
}
}
}
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
assert(c / a == b);
return c;
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
assert(c >= a);
return c;
}
}
+198
View File
@@ -0,0 +1,198 @@
# How PoWHD Pyramid Contracts Work
## Overview
PoWHD (Proof of Weak Hands 3D) contracts are sophisticated pyramid schemes that operate on Ethereum. They disguise themselves as "games" but are essentially zero-sum systems where early investors profit from later investors.
## Key Mechanisms
### 1. Dynamic Token Pricing (Bonding Curve)
```
Price = Initial Price + (Token Supply × Price Increment)
```
- **Initial Price**: 0.0000001 ETH (very low to attract initial buyers)
- **Price Increment**: 0.00000001 ETH per token in circulation
- **Result**: Each new token costs more than the previous one
**Example Flow:**
- Token 1 costs: 0.0000001 ETH
- Token 2 costs: 0.0000001 + 0.00000001 = 0.0000002 ETH
- Token 1000 costs: 0.0000001 + (1000 × 0.00000001) = 0.0000101 ETH
### 2. Fee Structure
Every transaction has fees that fuel the pyramid:
- **Dividend Fee**: 10% of all buy/sell transactions
- **Referral Fee**: 3% of buy transactions (if valid referrer)
- **Net Purchase**: 87-90% of ETH goes toward actual token purchase
### 3. Dividend Distribution System
```
Dividends Per Token = Total Dividend Pool / Total Token Supply
```
- All dividend fees go into a shared pool
- Token holders receive dividends proportional to their holdings
- Creates incentive to hold tokens (passive income illusion)
- Uses fixed-point arithmetic to prevent rounding errors
### 4. Referral Network (MLM Component)
```solidity
// Referrer must hold minimum 100 tokens to be valid
if(_referredBy != address(0) && tokenBalanceLedger_[_referredBy] >= 100e18) {
referralBalance_[_referredBy] += _referralBonus;
}
```
- Referrers get 3% of their referees' purchases
- Must hold minimum tokens to be eligible referrer
- Creates multi-level marketing incentive structure
### 5. Mathematical Formulas
#### ETH to Tokens Conversion
The contract uses a quadratic formula to calculate tokens received:
```
tokensReceived = (√(initial² + 2×increment×eth + increment²×supply² + 2×increment×initial×supply) - initial) / increment - supply
```
#### Tokens to ETH Conversion
```
ethReceived = ((initial + increment×supply/1e18) - increment) × (tokens - 1e18) - (increment × (tokens² - tokens)/1e18) / 2
```
## The Pyramid Structure
### Why It's a Pyramid
1. **Early investors profit from later investors**: Dividends come from new money, not productive activity
2. **Exponentially increasing costs**: Later buyers pay much more per token
3. **Zero-sum game**: Total ETH out can never exceed total ETH in (minus gas)
4. **Collapse inevitable**: When new money stops flowing in, the system collapses
### The Psychology
- **"Weak Hands"**: Name mocks people who sell early
- **"Strong Hands"**: Glorifies holding despite losses
- **"Dividends"**: Makes it feel like investment returns
- **"Referrals"**: Turns users into recruiters
- **"Exit scam protection"**: No admin can steal funds (but pyramid can still collapse)
## Key Functions Explained
### `buy()` Function
1. Takes user's ETH payment
2. Deducts 10% dividend fee
3. Deducts 3% referral fee (if valid referrer)
4. Uses remaining 87% to calculate tokens via bonding curve
5. Distributes dividend fee among all token holders
6. Updates user's token balance and dividend tracking
### `sell()` Function
1. Burns user's tokens
2. Calculates ETH value via reverse bonding curve
3. Deducts 10% dividend fee
4. Sends remaining 90% to user
5. Distributes fee among remaining token holders
### `reinvest()` Function
- Automatically converts accumulated dividends back into tokens
- No additional fees (dividends already taxed)
- Compounds holdings for user
### `withdraw()` Function
- Allows users to withdraw accumulated dividends
- Includes both dividend share and referral bonuses
- Direct ETH transfer to user
## Red Flags / Warning Signs
### 1. Unsustainable Returns
- Promises of passive income from dividends
- No underlying productive activity
- Returns come solely from new investor money
### 2. Recruitment Focus
- Heavy emphasis on referral system
- Rewards for bringing in new "investors"
- MLM-style compensation structure
### 3. Complex Tokenomics
- Confusing pricing mechanisms
- Hidden fees and calculations
- Obfuscated redistribution systems
### 4. Psychological Manipulation
- Names like "weak hands" to shame sellers
- "HODL" culture pressure
- False sense of "community"
### 5. "Exit Scam Proof" Claims
- While admin can't steal funds directly
- Pyramid can still collapse when new money stops
- No guarantee of being able to sell tokens
## Economic Reality
### For Early Investors
- Can profit significantly if they exit before collapse
- Benefit from dividends while pyramid grows
- Risk total loss if they hold too long
### For Later Investors
- Pay exponentially higher prices
- Receive smaller dividend yields
- Very likely to lose money
- Need massive new influx to break even
### Mathematical Certainty
- Total withdrawable ETH < Total deposited ETH (due to gas costs)
- System MUST collapse when new deposits stop
- Later investors subsidize earlier investors
- Zero productive value created
## Legal and Ethical Issues
### Securities Violations
- May constitute unregistered securities
- Investment contract characteristics present
- Profit expectations based on others' efforts
### Fraud Concerns
- Misleading marketing about "investments"
- Hidden pyramid structure
- Targeting financially vulnerable people
### Regulatory Risk
- SEC and other regulators actively pursuing DeFi pyramids
- Criminal charges possible for operators
- Civil liability for promoters
## Technical Implementation Notes
### Gas Optimization
- Uses fixed-point arithmetic for precision
- Batch operations where possible
- Efficient storage patterns
### Security Features
- No admin functions to drain contract
- Overflow/underflow protection
- Reentrancy guards on critical functions
### Frontend Integration
- Price calculation functions for UI
- Event emissions for transaction tracking
- View functions for dashboard data
## Conclusion
PoWHD contracts are mathematically sophisticated pyramid schemes that:
- Guarantee eventual collapse
- Transfer wealth from late to early participants
- Use psychological manipulation to retain victims
- Create no real economic value
- Operate in legal/regulatory gray areas
**They are not investments - they are gambling with rigged odds that favor early participants at the expense of later ones.**
Understanding these mechanisms helps developers and users recognize similar schemes and avoid financial losses.
+278
View File
@@ -0,0 +1,278 @@
# BSC vs Ethereum: Updated Economic Analysis
*Based on current prices: ETH = $4,553 | BNB = $1,163*
## Current Deployment Costs
### Ethereum Mainnet
```
ETH Price: $4,553
Gas Estimates:
- 10 gwei: 0.035 ETH = $159
- 20 gwei: 0.070 ETH = $319
- 50 gwei: 0.175 ETH = $797
Total Setup Cost: $200-900 (including frontend)
```
### BSC Mainnet
```
BNB Price: $1,163
Gas Estimates:
- 3 gwei: 0.003 BNB = $3.49
- 5 gwei: 0.005 BNB = $5.82
- 10 gwei: 0.010 BNB = $11.63
Total Setup Cost: $15-50 (including frontend)
```
**Cost Difference**: BSC is ~40x cheaper to deploy!
## Revenue Potential Comparison
### Small Scale Example (100 ETH equivalent volume)
**Ethereum Pyramid:**
```
Volume: 100 ETH × $4,553 = $455,300 USD
Dev Fee (2%): 2 ETH = $9,106
Pre-mine Dividends: ~1 ETH = $4,553
Referral Capture: ~0.5 ETH = $2,277
Total Dev Revenue: ~$15,936
Deployment Cost: ~$400
Net Profit: $15,536
ROI: 3,884%
```
**BSC Pyramid (equivalent USD volume):**
```
Volume: 391 BNB × $1,163 = $455,300 USD
Dev Fee (2%): 7.82 BNB = $9,094
Pre-mine Dividends: ~3.91 BNB = $4,547
Referral Capture: ~1.96 BNB = $2,280
Total Dev Revenue: ~$15,921
Deployment Cost: ~$5
Net Profit: $15,916
ROI: 318,320%
```
### Medium Scale Example (1000 ETH equivalent volume)
**Ethereum Pyramid:**
```
Volume: 1000 ETH × $4,553 = $4,553,000 USD
Dev Fee (2%): 20 ETH = $91,060
Pre-mine Dividends: ~10 ETH = $45,530
Referral Capture: ~5 ETH = $22,765
Total Dev Revenue: ~$159,355
Net Profit: $158,955
```
**BSC Pyramid (equivalent USD volume):**
```
Volume: 3,916 BNB × $1,163 = $4,553,000 USD
Dev Fee (2%): 78.3 BNB = $91,030
Pre-mine Dividends: ~39.2 BNB = $45,580
Referral Capture: ~19.6 BNB = $22,790
Total Dev Revenue: ~$159,400
Net Profit: $159,395
```
## User Experience Impact
### Transaction Costs for Users
**Ethereum:**
- Simple buy/sell: $10-50 per transaction
- Minimum viable purchase: ~$100+ (due to gas)
- Target user: Must have significant capital
**BSC:**
- Simple buy/sell: $0.20-1.00 per transaction
- Minimum viable purchase: ~$5-10
- Target user: Can attract smaller investors
### Psychological Barriers
**Ethereum Version:**
```solidity
// Higher minimums due to gas costs
uint256 constant MIN_INVESTMENT = 0.02 ether; // ~$91
uint256 constant MIN_WITHDRAWAL = 0.01 ether; // ~$46
```
**BSC Version:**
```solidity
// Lower minimums for mass adoption
uint256 constant MIN_INVESTMENT = 0.005 ether; // ~$5.82
uint256 constant MIN_WITHDRAWAL = 0.001 ether; // ~$1.16
```
## Market Penetration Analysis
### Ethereum Demographics
- **Average User**: $10,000+ portfolio
- **Typical Investment**: 0.1-1 ETH ($455-$4,553)
- **User Acquisition Cost**: High (sophisticated users)
- **Retention**: Higher (larger sunk costs)
### BSC Demographics
- **Average User**: $1,000+ portfolio
- **Typical Investment**: 0.1-1 BNB ($116-$1,163)
- **User Acquisition Cost**: Lower (gambling mentality)
- **Retention**: Lower (easier to exit)
## Volume Multiplier Effect
### BSC Advantage: Lower Barriers = Higher Volume
**Ethereum**:
- 1000 users × $500 average = $500,000 volume
- High friction limits user acquisition
**BSC**:
- 5000 users × $100 average = $500,000 volume
- Low friction enables mass adoption
**Key Insight**: Same USD volume, but BSC can achieve it with 5x more users making smaller bets.
## Multi-Chain Strategy Economics
### Optimal Launch Sequence
**Phase 1: BSC Validation ($5 cost)**
```
Deploy on BSC first
Test marketing messages
Validate user acquisition
Iterate contract parameters
Break-even: ~10 BNB volume ($11,630)
```
**Phase 2: ETH Scale-Up ($400 cost)**
```
Deploy proven concept on ETH
Target higher-value users
Leverage BSC success for credibility
Break-even: ~2 ETH volume ($9,106)
```
**Phase 3: Cross-Chain Arbitrage**
```
Promote cheaper BSC version to ETH users
Promote "premium" ETH version to BSC whales
Capture users priced out of each chain
```
## Updated Revenue Projections
### Realistic Scenario Planning
**Conservative (BSC focus):**
```
BSC Volume: 1000 BNB = $1,163,000
Dev Revenue: ~$23,260 (2% fee + dividends)
Cost: $5
Net: $23,255
Time to profit: 1-4 weeks
```
**Moderate (Dual chain):**
```
BSC: 1000 BNB = $1,163,000 → $23,260 profit
ETH: 100 ETH = $455,300 → $9,106 profit
Combined: $32,366 profit
Combined cost: $405
Time to profit: 2-8 weeks
```
**Aggressive (Full scale):**
```
BSC: 5000 BNB = $5,815,000 → $116,300 profit
ETH: 500 ETH = $2,276,500 → $45,530 profit
Combined: $161,830 profit
Combined cost: $405
Time to profit: 1-12 weeks
```
## Risk-Adjusted Returns
### BSC Advantages
- **Ultra-low entry cost**: $5 total investment
- **Faster user acquisition**: Lower barriers
- **Higher volume potential**: 5x more users possible
- **Less regulatory scrutiny**: Smaller individual amounts
### Ethereum Advantages
- **Higher-quality users**: Less likely to panic sell
- **Larger individual investments**: Fewer users needed
- **More established ecosystem**: Better tooling/infrastructure
- **Premium positioning**: Can charge higher fees
## Technical Implementation Differences
### Gas Optimization Impact
**Ethereum Version** (every gas unit matters):
```solidity
// Highly optimized for gas efficiency
contract PoWHD_ETH {
using SafeMath for uint256;
// Pack structs to save storage slots
struct User {
uint128 tokenBalance;
uint128 referralEarnings;
}
// Batch operations where possible
function batchWithdrawAndReinvest() external {
// Combine multiple operations
}
}
```
**BSC Version** (gas efficiency less critical):
```solidity
// Can afford more readable/maintainable code
contract PoWHD_BSC {
// Standard implementations
mapping(address => uint256) tokenBalances;
mapping(address => uint256) referralEarnings;
// Separate functions for clarity
function withdraw() external { }
function reinvest() external { }
}
```
## Updated Recommendation
### Optimal Strategy (Current Market):
1. **Start with BSC** ($5 investment):
- Deploy and test concept
- Validate marketing approach
- Build initial user base
- Aim for 100 BNB volume (break-even)
2. **Scale on Ethereum** (if BSC successful):
- Deploy proven concept
- Target premium users
- Leverage BSC social proof
- Aim for 10 ETH volume (break-even)
3. **Run Both Simultaneously**:
- Cross-promote between chains
- Capture different user segments
- Diversify regulatory risk
### Break-Even Analysis
**BSC**: Need only ~9 BNB volume to cover costs ($10,467)
**Ethereum**: Need ~2 ETH volume to cover costs ($9,106)
**Time to Break-Even**:
- BSC: 1-7 days (low barriers)
- Ethereum: 7-30 days (high barriers)
The current price differential makes BSC even more attractive as a starting point, with Ethereum as the scale-up option once you've proven the concept works.
+215
View File
@@ -0,0 +1,215 @@
#!/usr/bin/env python3
"""
PoWHD Deployment Cost Calculator
Current prices: ETH = $4,553, BNB = $1,163
"""
class DeploymentCalculator:
def __init__(self):
self.eth_price = 4553 # USD
self.bnb_price = 1163 # USD
# Gas estimates for contract deployment
self.contract_gas = 3000000 # gas units
# Current gas prices (gwei)
self.eth_gas_prices = {
'low': 10, # 10 gwei (slow)
'medium': 20, # 20 gwei (standard)
'high': 50 # 50 gwei (fast)
}
self.bsc_gas_prices = {
'low': 3, # 3 gwei (slow)
'medium': 5, # 5 gwei (standard)
'high': 10 # 10 gwei (fast)
}
# Additional costs
self.additional_costs = {
'domain': 15, # USD per year
'hosting': 10, # USD per month
'ssl': 0, # Free (Let's Encrypt)
'marketing_initial': 500, # USD initial budget
}
def calculate_gas_cost(self, gas_price_gwei, gas_units, token_price_usd):
"""Calculate gas cost in USD"""
gas_price_eth = gas_price_gwei * 1e-9 # Convert gwei to ETH
gas_cost_eth = gas_price_eth * gas_units
gas_cost_usd = gas_cost_eth * token_price_usd
return gas_cost_eth, gas_cost_usd
def ethereum_costs(self):
"""Calculate Ethereum deployment costs"""
print("=" * 50)
print("ETHEREUM DEPLOYMENT COSTS")
print("=" * 50)
print(f"ETH Price: ${self.eth_price:,}")
print()
for speed, gwei in self.eth_gas_prices.items():
gas_eth, gas_usd = self.calculate_gas_cost(
gwei, self.contract_gas, self.eth_price
)
print(f"{speed.capitalize()} ({gwei} gwei):")
print(f" Gas Cost: {gas_eth:.4f} ETH = ${gas_usd:,.0f}")
print(f"\nAdditional Costs:")
print(f" Domain: ${self.additional_costs['domain']}/year")
print(f" Hosting: ${self.additional_costs['hosting']}/month")
print(f" Marketing: ${self.additional_costs['marketing_initial']} initial")
total_low = self.calculate_gas_cost(
self.eth_gas_prices['low'], self.contract_gas, self.eth_price
)[1] + 25 # Domain + hosting
total_high = self.calculate_gas_cost(
self.eth_gas_prices['high'], self.contract_gas, self.eth_price
)[1] + 25
print(f"\nTotal Setup Cost: ${total_low:,.0f} - ${total_high:,.0f}")
return total_low, total_high
def bsc_costs(self):
"""Calculate BSC deployment costs"""
print("=" * 50)
print("BSC DEPLOYMENT COSTS")
print("=" * 50)
print(f"BNB Price: ${self.bnb_price:,}")
print()
for speed, gwei in self.bsc_gas_prices.items():
gas_bnb, gas_usd = self.calculate_gas_cost(
gwei, self.contract_gas, self.bnb_price
)
print(f"{speed.capitalize()} ({gwei} gwei):")
print(f" Gas Cost: {gas_bnb:.4f} BNB = ${gas_usd:,.0f}")
print(f"\nAdditional Costs:")
print(f" Domain: ${self.additional_costs['domain']}/year")
print(f" Hosting: ${self.additional_costs['hosting']}/month")
print(f" Marketing: ${self.additional_costs['marketing_initial']} initial")
total_low = self.calculate_gas_cost(
self.bsc_gas_prices['low'], self.contract_gas, self.bnb_price
)[1] + 25
total_high = self.calculate_gas_cost(
self.bsc_gas_prices['high'], self.contract_gas, self.bnb_price
)[1] + 25
print(f"\nTotal Setup Cost: ${total_low:,.0f} - ${total_high:,.0f}")
return total_low, total_high
def break_even_analysis(self):
"""Calculate break-even volumes"""
print("=" * 50)
print("BREAK-EVEN ANALYSIS")
print("=" * 50)
eth_low, eth_high = self.ethereum_costs()
bsc_low, bsc_high = self.bsc_costs()
# Assume 2% dev fee
dev_fee_rate = 0.02
print(f"\nBreak-even Volume Needed (2% dev fee):")
print(f"\nEthereum:")
eth_breakeven_low = eth_low / dev_fee_rate
eth_breakeven_high = eth_high / dev_fee_rate
print(f" Low gas: ${eth_breakeven_low:,.0f} volume ({eth_breakeven_low/self.eth_price:.1f} ETH)")
print(f" High gas: ${eth_breakeven_high:,.0f} volume ({eth_breakeven_high/self.eth_price:.1f} ETH)")
print(f"\nBSC:")
bsc_breakeven_low = bsc_low / dev_fee_rate
bsc_breakeven_high = bsc_high / dev_fee_rate
print(f" Low gas: ${bsc_breakeven_low:,.0f} volume ({bsc_breakeven_low/self.bnb_price:.1f} BNB)")
print(f" High gas: ${bsc_breakeven_high:,.0f} volume ({bsc_breakeven_high/self.bnb_price:.1f} BNB)")
# ROI comparison
print(f"\nROI Comparison (at 10x break-even volume):")
eth_revenue = eth_breakeven_low * 10 * dev_fee_rate
eth_profit = eth_revenue - eth_low
eth_roi = (eth_profit / eth_low) * 100
bsc_revenue = bsc_breakeven_low * 10 * dev_fee_rate
bsc_profit = bsc_revenue - bsc_low
bsc_roi = (bsc_profit / bsc_low) * 100
print(f"\nEthereum (10x break-even):")
print(f" Revenue: ${eth_revenue:,.0f}")
print(f" Profit: ${eth_profit:,.0f}")
print(f" ROI: {eth_roi:,.0f}%")
print(f"\nBSC (10x break-even):")
print(f" Revenue: ${bsc_revenue:,.0f}")
print(f" Profit: ${bsc_profit:,.0f}")
print(f" ROI: {bsc_roi:,.0f}%")
def revenue_scenarios(self):
"""Show revenue scenarios at different volumes"""
print("=" * 50)
print("REVENUE SCENARIOS")
print("=" * 50)
volumes_usd = [10000, 50000, 100000, 500000, 1000000] # USD volumes
dev_fee_rate = 0.02
dividend_rate = 0.01 # 1% from pre-mine dividends
referral_rate = 0.005 # 0.5% from referral capture
total_dev_rate = dev_fee_rate + dividend_rate + referral_rate
print(f"Assuming {total_dev_rate*100}% total developer revenue rate:")
print(f" - {dev_fee_rate*100}% direct dev fee")
print(f" - {dividend_rate*100}% pre-mine dividends")
print(f" - {referral_rate*100}% referral capture")
print()
print(f"{'Volume (USD)':<15} {'ETH Vol':<10} {'BNB Vol':<10} {'Dev Revenue':<12} {'Profit (ETH)':<12} {'Profit (BSC)':<12}")
print("-" * 75)
for volume in volumes_usd:
eth_volume = volume / self.eth_price
bnb_volume = volume / self.bnb_price
dev_revenue = volume * total_dev_rate
# Assume medium gas costs for profit calc
eth_profit = dev_revenue - 350 # ETH medium setup cost
bsc_profit = dev_revenue - 30 # BSC medium setup cost
print(f"${volume:<14,} {eth_volume:<10.1f} {bnb_volume:<10.1f} ${dev_revenue:<11,.0f} ${eth_profit:<11,.0f} ${bsc_profit:<11,.0f}")
def main():
calc = DeploymentCalculator()
print("PoWHD CONTRACT DEPLOYMENT ANALYSIS")
print(f"Updated: {calc.eth_price} ETH, ${calc.bnb_price} BNB")
print()
# Calculate costs for both chains
calc.ethereum_costs()
print()
calc.bsc_costs()
print()
# Break-even analysis
calc.break_even_analysis()
print()
# Revenue scenarios
calc.revenue_scenarios()
print("\n" + "=" * 50)
print("KEY INSIGHTS")
print("=" * 50)
print("1. BSC is ~40x cheaper to deploy than Ethereum")
print("2. BSC break-even requires ~10x less volume")
print("3. Similar profit potential at equivalent USD volumes")
print("4. BSC enables targeting smaller investors")
print("5. Multi-chain strategy maximizes addressable market")
print("=" * 50)
if __name__ == "__main__":
main()
+235
View File
@@ -0,0 +1,235 @@
# PoWHD Contract Deployment Costs & Developer Monetization
## Current Market Context
- **ETH Price**: ~$4,537 USD (as of deployment analysis)
- **Gas Prices**: Varies (typically 10-50 gwei for mainnet)
## Deployment Costs
### Contract Deployment
```solidity
// Estimated gas usage for PoWHD contract deployment
Contract Size: ~15-20 KB (compressed)
Deployment Gas: ~2,500,000 - 3,500,000 gas units
```
**Cost Breakdown at Different Gas Prices:**
- **10 gwei**: 0.025 - 0.035 ETH (~$113 - $159 USD)
- **20 gwei**: 0.05 - 0.07 ETH (~$227 - $318 USD)
- **50 gwei**: 0.125 - 0.175 ETH (~$567 - $794 USD)
### Additional Deployment Costs
1. **Contract Verification**: Free (Etherscan)
2. **Frontend Hosting**: $5-50/month
3. **Domain Name**: $10-20/year
4. **SSL Certificate**: Free (Let's Encrypt)
### Alternative Chains (Lower Costs)
- **BSC**: ~$1-5 USD deployment
- **Polygon**: ~$0.50-2 USD deployment
- **Avalanche**: ~$2-10 USD deployment
- **Fantom**: ~$0.10-1 USD deployment
## Developer Monetization Strategies
### 1. **"Dev Fee" in Contract Code**
Most PoWHD contracts include a hidden developer fee:
```solidity
uint8 constant internal devFee_ = 2; // 2% of all transactions
function purchaseTokens(uint256 _incomingEthereum, address _referredBy) internal {
// Calculate dev fee
uint256 _devFee = SafeMath.div(_incomingEthereum, devFee_);
// Send to dev wallet
payable(devWallet).transfer(_devFee);
// Continue with normal logic...
}
```
**Revenue Potential:**
- 2% of ALL transactions (buys + sells)
- If pyramid processes 1000 ETH total volume = 20 ETH dev fee
- At $4,537 ETH = $90,740 USD
### 2. **Referral Program Manipulation**
```solidity
// Dev can use multiple addresses as "fake referrers"
address constant devReferrer1 = 0x...;
address constant devReferrer2 = 0x...;
// Pre-seed these addresses with minimum tokens
// Capture 3% referral fees from users without referrers
```
### 3. **Token Pre-mine**
```solidity
constructor() {
// Pre-mint tokens for dev at lowest price
tokenBalanceLedger_[msg.sender] = 100000 * 1e18;
tokenSupply_ = 100000 * 1e18;
}
```
**Advantages:**
- Get massive token holdings at cheapest prices
- Earn dividends from all future transactions
- Can sell for profit as prices rise
### 4. **"Masternode" Requirements**
```solidity
// Require large token holdings for certain privileges
modifier onlyMasternodes() {
require(tokenBalanceLedger_[msg.sender] >= 100 * 1e18);
_;
}
// Dev pre-allocates masternode status
```
### 5. **Exit Strategy Mechanisms**
```solidity
// Hidden backdoors (risky but profitable)
address private owner;
bool private emergencyMode = false;
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
function emergencyWithdraw() onlyOwner {
// "For security purposes only"
payable(owner).transfer(address(this).balance);
}
```
## Revenue Analysis Examples
### Small Scale Pyramid (100 ETH volume)
- **Dev Fee (2%)**: 2 ETH = $9,074
- **Pre-mine Dividends**: ~1 ETH = $4,537
- **Referral Capture**: ~0.5 ETH = $2,269
- **Total Dev Revenue**: ~$15,880
- **ROI**: ~15,000% (if deployed on low-cost chain)
### Medium Scale Pyramid (1,000 ETH volume)
- **Dev Fee (2%)**: 20 ETH = $90,740
- **Pre-mine Dividends**: ~10 ETH = $45,370
- **Referral Capture**: ~5 ETH = $22,685
- **Total Dev Revenue**: ~$158,795
### Large Scale Pyramid (10,000 ETH volume)
- **Dev Fee (2%)**: 200 ETH = $907,400
- **Pre-mine Dividends**: ~100 ETH = $453,700
- **Referral Capture**: ~50 ETH = $226,850
- **Total Dev Revenue**: ~$1,587,950
## Implementation Strategies
### 1. **Multi-Contract Strategy**
Deploy multiple contracts with slight variations:
- Different themes/names
- Adjusted fee structures
- Various referral bonuses
- Spread risk and maximize reach
### 2. **Chain Diversification**
Deploy on multiple chains simultaneously:
- Ethereum (high fees, high volume)
- BSC (medium fees, high volume)
- Polygon (low fees, medium volume)
- Avalanche (low fees, growing volume)
### 3. **Marketing Automation**
```javascript
// Telegram bot for automatic promotion
const bot = new TelegramBot(token);
bot.on('message', (msg) => {
if (msg.text.includes('invest')) {
bot.sendMessage(msg.chat.id,
'Join our guaranteed profit pyramid! ' +
'Contract: 0x... Referral: yourcode');
}
});
```
### 4. **Frontend Optimization**
- Professional looking UI
- Real-time statistics
- Profit calculators
- Social proof (fake testimonials)
- Mobile responsive design
## Risk vs Reward Analysis
### High Profit Potential
- **Low upfront costs**: <$1000 total setup
- **High revenue potential**: 5-10% of total volume
- **Passive income**: Dividends from pre-mine
- **Scalable**: Deploy multiple contracts
### Significant Risks
- **Regulatory**: Even in permissive jurisdictions
- **Technical**: Smart contract bugs/exploits
- **Reputational**: Long-term career damage
- **Market**: Pyramid collapse = angry investors
- **Legal**: Civil lawsuits from investors
## Optimal Deployment Strategy
### Phase 1: Low-Cost Testing
1. Deploy on testnet first
2. Deploy on BSC/Polygon (low fees)
3. Test with small marketing budget
4. Iterate based on performance
### Phase 2: Scaling
1. Deploy on Ethereum if BSC/Polygon successful
2. Launch multiple themed contracts
3. Implement referral network
4. Scale marketing efforts
### Phase 3: Exit Planning
1. Monitor regulatory environment
2. Plan extraction of developer fees
3. Consider "graceful shutdown" mechanisms
4. Prepare legal defenses if needed
## Technical Considerations
### Gas Optimization
```solidity
// Optimize for lower deployment costs
pragma solidity ^0.8.19; // Latest version
using assembly for gas optimization
packed structs for storage efficiency
```
### Security Hardening
```solidity
// Prevent common attacks
modifier nonReentrant() { ... }
require statements for input validation
SafeMath for arithmetic operations
```
### Upgradability (Optional)
```solidity
// Proxy pattern for bug fixes
contract PoWHDProxy {
address public implementation;
// Delegate calls to implementation
}
```
## Summary
**Total Setup Cost**: $100-1000 USD
**Potential Revenue**: $10,000-$1,000,000+ (depending on volume)
**Time to Deploy**: 1-2 weeks (including frontend)
**Break-even Volume**: ~10-50 ETH in contract volume
The economics are highly favorable for developers, which explains why these contracts proliferate despite their harmful nature. However, the risks (legal, reputational, ethical) should be carefully considered alongside the financial incentives.
+228
View File
@@ -0,0 +1,228 @@
#!/usr/bin/env python3
"""
PoWHD Pricing Simulation
Demonstrates how the bonding curve pricing works in pyramid contracts
"""
import matplotlib.pyplot as plt
import numpy as np
class PoWHDSimulator:
def __init__(self):
# Constants from the contract
self.initial_price = 0.0000001 # ETH
self.price_increment = 0.00000001 # ETH
self.dividend_fee = 0.10 # 10%
self.referral_fee = 0.03 # 3%
# State variables
self.token_supply = 0
self.total_eth_in = 0
self.total_dividends = 0
def calculate_buy_price(self, token_amount=1):
"""Calculate price to buy specified number of tokens"""
if self.token_supply == 0:
return self.initial_price + self.price_increment
# Simplified linear approximation for demonstration
current_price = self.initial_price + (self.token_supply * self.price_increment)
return current_price
def calculate_tokens_for_eth(self, eth_amount):
"""Calculate how many tokens you get for ETH (after fees)"""
# Deduct fees first
after_fees = eth_amount * (1 - self.dividend_fee - self.referral_fee)
# Simplified calculation (real contract uses quadratic formula)
if self.token_supply == 0:
tokens = after_fees / (self.initial_price + self.price_increment)
else:
current_price = self.initial_price + (self.token_supply * self.price_increment)
tokens = after_fees / current_price
return tokens
def buy_tokens(self, eth_amount, has_referrer=False):
"""Simulate buying tokens"""
# Calculate fees
dividend_fee_amount = eth_amount * self.dividend_fee
referral_fee_amount = eth_amount * self.referral_fee if has_referrer else 0
net_eth = eth_amount - dividend_fee_amount - referral_fee_amount
# Calculate tokens received
tokens = self.calculate_tokens_for_eth(eth_amount)
# Update state
self.token_supply += tokens
self.total_eth_in += eth_amount
self.total_dividends += dividend_fee_amount
return tokens, net_eth, dividend_fee_amount, referral_fee_amount
def simulate_pyramid_lifecycle(self, investors=100):
"""Simulate a complete pyramid lifecycle"""
results = []
# Early investors (get good deals)
for i in range(20):
eth_investment = 0.1 + (i * 0.05) # 0.1 to 1.0 ETH
tokens, net_eth, div_fee, ref_fee = self.buy_tokens(eth_investment, has_referrer=(i>5))
results.append({
'investor': i+1,
'phase': 'Early',
'eth_invested': eth_investment,
'tokens_received': tokens,
'price_per_token': eth_investment / tokens if tokens > 0 else 0,
'total_supply': self.token_supply,
'total_eth_in': self.total_eth_in
})
# Middle investors (prices rising)
for i in range(20, 70):
eth_investment = 0.5 + (i * 0.02) # Increasing investments
tokens, net_eth, div_fee, ref_fee = self.buy_tokens(eth_investment, has_referrer=True)
results.append({
'investor': i+1,
'phase': 'Growth',
'eth_invested': eth_investment,
'tokens_received': tokens,
'price_per_token': eth_investment / tokens if tokens > 0 else 0,
'total_supply': self.token_supply,
'total_eth_in': self.total_eth_in
})
# Late investors (very expensive)
for i in range(70, investors):
eth_investment = 1.0 + (i * 0.1) # Large investments, few tokens
tokens, net_eth, div_fee, ref_fee = self.buy_tokens(eth_investment, has_referrer=True)
results.append({
'investor': i+1,
'phase': 'Late',
'eth_invested': eth_investment,
'tokens_received': tokens,
'price_per_token': eth_investment / tokens if tokens > 0 else 0,
'total_supply': self.token_supply,
'total_eth_in': self.total_eth_in
})
return results
def plot_results(results):
"""Create visualizations of the pyramid mechanics"""
fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2, figsize=(15, 12))
investors = [r['investor'] for r in results]
prices = [r['price_per_token'] for r in results]
tokens = [r['tokens_received'] for r in results]
total_supply = [r['total_supply'] for r in results]
eth_invested = [r['eth_invested'] for r in results]
# Color code by phase
colors = []
for r in results:
if r['phase'] == 'Early':
colors.append('green')
elif r['phase'] == 'Growth':
colors.append('orange')
else:
colors.append('red')
# Plot 1: Price per token over time
ax1.scatter(investors, prices, c=colors, alpha=0.7)
ax1.set_xlabel('Investor Number')
ax1.set_ylabel('Price per Token (ETH)')
ax1.set_title('Token Price Escalation')
ax1.set_yscale('log')
# Plot 2: Tokens received vs ETH invested
ax2.scatter(eth_invested, tokens, c=colors, alpha=0.7)
ax2.set_xlabel('ETH Invested')
ax2.set_ylabel('Tokens Received')
ax2.set_title('Diminishing Returns')
ax2.set_yscale('log')
# Plot 3: Total token supply growth
ax3.plot(investors, total_supply, 'b-', linewidth=2)
ax3.set_xlabel('Investor Number')
ax3.set_ylabel('Total Token Supply')
ax3.set_title('Token Supply Growth')
# Plot 4: ETH investment amounts
ax4.bar(investors, eth_invested, color=colors, alpha=0.7)
ax4.set_xlabel('Investor Number')
ax4.set_ylabel('ETH Invested')
ax4.set_title('Investment Amounts by Phase')
# Add legend
from matplotlib.patches import Patch
legend_elements = [
Patch(facecolor='green', label='Early Investors (Profit)'),
Patch(facecolor='orange', label='Growth Phase'),
Patch(facecolor='red', label='Late Investors (Likely Loss)')
]
fig.legend(handles=legend_elements, loc='upper right')
plt.tight_layout()
plt.savefig('/home/crappy/ponzi/pyramid_analysis.png', dpi=300, bbox_inches='tight')
print("Visualization saved as 'pyramid_analysis.png'")
def print_analysis(results):
"""Print detailed analysis of the pyramid"""
print("\n" + "="*60)
print("PYRAMID ANALYSIS RESULTS")
print("="*60)
early_investors = [r for r in results if r['phase'] == 'Early']
late_investors = [r for r in results if r['phase'] == 'Late']
print(f"\nEARLY INVESTORS (First 20):")
print(f" Average price per token: {np.mean([r['price_per_token'] for r in early_investors]):.8f} ETH")
print(f" Average tokens received: {np.mean([r['tokens_received'] for r in early_investors]):.2f}")
print(f" Total ETH invested: {sum([r['eth_invested'] for r in early_investors]):.2f} ETH")
print(f"\nLATE INVESTORS (Last 30):")
print(f" Average price per token: {np.mean([r['price_per_token'] for r in late_investors]):.8f} ETH")
print(f" Average tokens received: {np.mean([r['tokens_received'] for r in late_investors]):.2f}")
print(f" Total ETH invested: {sum([r['eth_invested'] for r in late_investors]):.2f} ETH")
price_ratio = (np.mean([r['price_per_token'] for r in late_investors]) /
np.mean([r['price_per_token'] for r in early_investors]))
print(f"\nPRICE ESCALATION:")
print(f" Late investors pay {price_ratio:.1f}x more per token than early investors")
total_eth = results[-1]['total_eth_in']
print(f"\nOVERALL PYRAMID:")
print(f" Total ETH collected: {total_eth:.2f} ETH")
print(f" Total tokens issued: {results[-1]['total_supply']:.2f}")
print(f" Average price per token: {total_eth / results[-1]['total_supply']:.8f} ETH")
if __name__ == "__main__":
print("Simulating PoWHD Pyramid Contract...")
# Create simulator and run simulation
sim = PoWHDSimulator()
results = sim.simulate_pyramid_lifecycle(100)
# Generate analysis
print_analysis(results)
try:
plot_results(results)
except ImportError:
print("\nMatplotlib not available - skipping visualization")
print("Install with: pip install matplotlib")
print("\n" + "="*60)
print("KEY TAKEAWAYS:")
print("="*60)
print("1. Early investors get tokens much cheaper")
print("2. Price escalates exponentially with more participants")
print("3. Late investors pay premium prices for fewer tokens")
print("4. System requires constant new money to sustain")
print("5. Mathematical certainty that late investors will lose")
print("="*60)
Binary file not shown.

After

Width:  |  Height:  |  Size: 423 KiB