Skip to content

Commit bfa4804

Browse files
committed
edited readme
1 parent dc66960 commit bfa4804

3 files changed

Lines changed: 28 additions & 34 deletions

File tree

README.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
# Strategy
22

3-
An ERC20 token backed by MON with daily lotteries and auctions.
3+
An ERC20 token backed by MEGA with daily lotteries and auctions.
44

55
## Overview
66

7-
Strategy is a collectible ERC20 token where:
7+
Strategy (GIGA) is a collectible ERC20 token where:
88

9-
- 1 MON mints 1000 MONSTR (minus 1% fee)
9+
- 1000 MEGA mints 1 GIGA (minus 1% fee)
1010
- All operations have a 1% fee that funds daily lotteries and auctions
1111
- Random holders win lottery prizes proportional to their holdings
12-
- After day 7, supply becomes fixed at the total minted
12+
- After the minting period, supply becomes fixed at the total minted
1313

1414
## Key Mechanics
1515

1616
### Minting & Redemption
1717

18-
- **Days 0-6**: Unlimited minting at 1:1000 ratio
19-
- **Day 7+**: Can only mint if someone redeems (burns) tokens first
20-
- Redeem MONSTR for MON anytime at contract's MON balance / total supply ratio (1% fee applies)
21-
- Redemption value increases as auctions bring in MON at market prices
18+
- **Minting Period (3 days)**: Unlimited minting at 1000:1 ratio (1000 MEGA = 1 GIGA)
19+
- **Post-Minting**: Can only mint if someone redeems (burns) tokens first
20+
- Redeem GIGA for MEGA anytime at proportional share of contract's MEGA reserve (1% fee applies)
21+
- Redemption value increases as auctions bring in MEGA at market prices
22+
- Requires ERC20 approval before minting: `mega.approve(strategyAddress, amount)`
2223

2324
### Daily Distribution
2425

@@ -28,15 +29,18 @@ Strategy is a collectible ERC20 token where:
2829

2930
### Auctions
3031

31-
- Use WMON for bidding (prevents DoS attacks)
32+
- Use MEGA for bidding (requires approval)
3233
- 10% minimum bid increment
33-
- Winners receive MONSTR tokens
34+
- Winners receive GIGA tokens
35+
- Previous bidders are refunded automatically
3436

3537
## Technical Details
3638

37-
- Built on OpenZeppelin ERC20
39+
- **GIGA Decimals**: 21
40+
- **MEGA Decimals**: 18
41+
- Built on OpenZeppelin ERC20 with SafeERC20
3842
- Uses Fenwick tree for efficient weighted random selection
39-
- 25-hour days ensure events rotate through different times
43+
- 25-hour days ensure events rotate through different times globally
4044
- Fully immutable - no admin functions
4145

4246
## Development
@@ -48,8 +52,11 @@ forge install
4852
# Run tests
4953
forge test
5054

51-
# Deploy
52-
forge script script/Deploy.s.sol --rpc-url <RPC_URL> --broadcast
55+
# Deploy (replace with actual MEGA token address)
56+
forge create src/Strategy.sol:Strategy \
57+
--constructor-args <MEGA_TOKEN_ADDRESS> \
58+
--rpc-url <RPC_URL> \
59+
--private-key <PRIVATE_KEY>
5360
```
5461

5562
## License

script/DeployMockERC20.s.sol

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,10 @@ contract DeployMockERC20Script is Script {
1717
function run() public {
1818
vm.startBroadcast();
1919

20-
// Get deployer address (msg.sender during broadcast)
21-
address deployer = msg.sender;
20+
// Deploy mock MEGA token (with 18 decimals)
21+
MockERC20 mockToken = new MockERC20("Mock MEGA", "MEGA");
2222

23-
// Deploy mock token with 1000 tokens (with 18 decimals)
24-
MockERC20 mockToken = new MockERC20(
25-
"Mock Token",
26-
"MOCK",
27-
deployer,
28-
1000 * 10 ** 18
29-
);
30-
31-
console.log("MockERC20 deployed at:", address(mockToken));
32-
console.log("Deployer address:", deployer);
33-
console.log("Initial balance:", mockToken.balanceOf(deployer));
23+
console.log("Mock MEGA deployed at:", address(mockToken));
3424

3525
vm.stopBroadcast();
3626
}

src/MockERC20.sol

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,9 @@ import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
88
* @notice Simple mock ERC20 token for testing purposes
99
*/
1010
contract MockERC20 is ERC20 {
11-
constructor(
12-
string memory name,
13-
string memory symbol,
14-
address initialHolder,
15-
uint256 initialSupply
16-
) ERC20(name, symbol) {
17-
_mint(initialHolder, initialSupply);
11+
constructor(string memory name, string memory symbol) ERC20(name, symbol) {}
12+
13+
function mint() external {
14+
_mint(msg.sender, 1e6 ether);
1815
}
1916
}

0 commit comments

Comments
 (0)