Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 14 additions & 16 deletions Clarinet.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
[project]
name = "BitStride"
description = ""
name = 'BitStride'
description = ''
authors = []
telemetry = true
cache_dir = "./.cache"

# [contracts.counter]
# path = "contracts/counter.clar"

cache_dir = './.cache'
requirements = []
[contracts.bitstride]
path = 'contracts/bitstride.clar'
clarity_version = 3
epoch = 3.1
[repl.analysis]
passes = ["check_checker"]
check_checker = { trusted_sender = false, trusted_caller = false, callee_filter = false }
passes = ['check_checker']

# Check-checker settings:
# trusted_sender: if true, inputs are trusted after tx_sender has been checked.
# trusted_caller: if true, inputs are trusted after contract-caller has been checked.
# callee_filter: if true, untrusted data may be passed into a private function without a
# warning, if it gets checked inside. This check will also propagate up to the
# caller.
# More informations: https://www.hiro.so/blog/new-safety-checks-in-clarinet
[repl.analysis.check_checker]
strict = false
trusted_sender = false
trusted_caller = false
callee_filter = false
132 changes: 132 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# BitStride Analytics & Governance Protocol

## Institutional-Grade DeFi Infrastructure on Bitcoin

BitStride combines Bitcoin's security with Stacks Layer 2 capabilities to create enterprise-ready decentralized finance infrastructure. This protocol enables:

- **Bitcoin-Secured STX Staking**
- **On-Chain Analytics Governance**
- **Tiered Institutional Rewards System**

Certified compliant with Stacks Improvement Proposals (SIPs) and Bitcoin OP_RETURN standards.

## Key Features

### 1. Bitcoin-Aligned Staking Engine

- STX token staking with variable lock periods (0-60 days)
- Dynamic reward calculation:
`Rewards = (Base Rate × Lock Multiplier × Tier Bonus) × Blocks Staked`
- Cooldown-protected withdrawals
- Minimum stake: 1,000,000 microSTX (1 STX)

### 2. Decentralized Governance Module

- Proposal creation threshold: 1M ANALYTICS-TOKEN
- Quadratic voting with stake-weighted power
- Protocol parameter control:
- Reward rates
- Fee structures
- System upgrades
- Emergency controls

### 3. Institutional Tier System

| Tier | Minimum STX | Multiplier | Governance Rights | Advanced Features |
| -------- | ----------- | ---------- | ----------------- | ----------------- |
| Silver | 1 STX | 1.0x | Basic voting | Core staking |
| Gold | 5 STX | 1.5x | Proposal creation | Analytics access |
| Platinum | 10 STX | 2.0x | Executive veto | API privileges |

## Technical Specifications

### Core Components

- **ANALYTICS-TOKEN** (Fungible Token)

- Symbol: `ANL`
- Decimals: 6
- Mint/Burn: Governance-controlled

- **Staking Parameters**

- Base Reward Rate: 5% APY
- Lock Multipliers: 1-1.5x
- Cooldown Period: 1440 blocks (~24h)

- **Governance Controls**
- Minimum Voting Period: 100 blocks
- Maximum Voting Period: 2880 blocks
- Proposal Execution Threshold: 1M votes

## System Workflows

### Staking Process

```mermaid
graph TD
A[User STX Transfer] --> B{Lock Period?}
B -->|0| C[Flexible Staking]
B -->|4320| D[30-Day Lock]
B -->|8640| E[60-Day Lock]
C --> F[Calculate Base Rewards]
D --> G[Apply 1.25x Multiplier]
E --> H[Apply 1.5x Multiplier]
F --> I[Update Position]
G --> I
H --> I
```

### Governance Lifecycle

1. Proposal Creation (`create-proposal`)
2. Voting Period (100-2880 blocks)
3. Quorum Check (≥1M votes)
4. Execution Window (72 blocks)
5. Parameter Update

## Security Architecture

### Multi-Layer Protection

```solidity
1. Bitcoin Finality
└── All transactions settled on Bitcoin L1

2. Stacks L2 Safeguards
├── Contract pause functionality
├── Emergency withdrawal mode
└── Cooldown timers

3. Protocol-Level Controls
├── Tiered access privileges
├── Proposal time locks
└── Owner override capabilities
```

### Stake STX (30-Day Lock)

```clarity
(contract-call? .bitstride-contract stake-stx u5000000 u4320)
```

### Create Governance Proposal

```clarity
(contract-call? .bitstride-contract create-proposal
"Increase base reward rate to 6%"
u1440
)
```

### Cast Governance Vote

```clarity
(contract-call? .bitstride-contract vote-on-proposal u17 true)
```

### Initiate Unstaking

```clarity
(contract-call? .bitstride-contract initiate-unstake u1000000)
```
Loading