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
33 changes: 33 additions & 0 deletions components/mdx/CodeBlock.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
'use client';

import dynamic from 'next/dynamic';

const Mermaid = dynamic(() => import('./Mermaid'), {
ssr: false,
loading: () => (
<div style={{
padding: '1rem',
backgroundColor: '#f5f5f5',
borderRadius: '4px',
textAlign: 'center',
color: '#666'
}}>
Loading diagram...
</div>
)
});

export default function CodeBlock({ className, children, ...props }) {
const language = className?.replace('language-', '') || '';

if (language === 'mermaid') {
const code = typeof children === 'string' ? children : String(children);
return <Mermaid chart={code} />;
}

return (
<code className={className} {...props}>
{children}
</code>
);
}
94 changes: 94 additions & 0 deletions components/mdx/Mermaid.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
'use client';

import { useEffect, useRef, useState, useId } from 'react';

export default function Mermaid({ chart }) {
const containerRef = useRef(null);
const [svg, setSvg] = useState('');
const [error, setError] = useState(null);
const uniqueId = useId().replace(/:/g, '-');

useEffect(() => {
if (!chart || typeof window === 'undefined') return;

let cancelled = false;

async function renderChart() {
try {
const mermaid = (await import('mermaid')).default;
mermaid.initialize({
startOnLoad: false,
theme: 'default',
securityLevel: 'loose',
fontFamily: 'inherit'
});

const { svg: renderedSvg } = await mermaid.render(
`mermaid-${uniqueId}`,
chart.trim()
);

if (!cancelled) {
setSvg(renderedSvg);
setError(null);
}
} catch (err) {
if (!cancelled) {
setError(err.message || 'Failed to render diagram');
setSvg('');
}
}
}

renderChart();

return () => {
cancelled = true;
};
}, [chart, uniqueId]);

if (error) {
return (
<div className="mermaid-error" style={{
padding: '1rem',
backgroundColor: '#fee',
border: '1px solid #c00',
borderRadius: '4px',
color: '#c00',
fontFamily: 'monospace',
fontSize: '0.875rem'
}}>
<strong>Mermaid Error:</strong> {error}
<pre style={{ marginTop: '0.5rem', whiteSpace: 'pre-wrap' }}>{chart}</pre>
</div>
);
}

if (!svg) {
return (
<div className="mermaid-loading" style={{
padding: '1rem',
backgroundColor: '#f5f5f5',
borderRadius: '4px',
textAlign: 'center',
color: '#666'
}}>
Loading diagram...
</div>
);
}

return (
<div
ref={containerRef}
className="mermaid-diagram"
style={{
display: 'flex',
justifyContent: 'center',
margin: '1.5rem 0',
overflow: 'auto'
}}
dangerouslySetInnerHTML={{ __html: svg }}
/>
);
}
193 changes: 193 additions & 0 deletions docs/features/rewards-version-1-friendly.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
# SEND Rewards: How You Earn

SEND rewards you for sending tokens, not just holding them. The more you send SEND to others, the more you earn back next month.

---

## Getting Started: Three Things You Need

Before you can earn rewards, you need to complete three steps:

```
╔══════════════════════════════════════════════════════════╗
║ QUALIFICATION ║
║ ║
║ ● Claim a Sendtag ═════⇒ Your identity ║
║ ● Hold minimum SEND ═════⇒ Your stake ║
║ ● Deposit in Send Earn ═════⇒ Your commitment ║
║ ║
║ All three required to earn rewards this month ║
╚══════════════════════════════════════════════════════════╝
```

These requirements are checked at the monthly snapshot. Miss one, and you won't qualify for that month's distribution.

---

## How Your Reward Gets Calculated

Your monthly reward comes from two pools:

```
╔════════════════════════════════════════════════════════════╗
║ MONTHLY DISTRIBUTION ║
║ ║
║ Total Pool ║
║ │ ║
║ ├───▶ Fixed Pool (tasks & bonuses) ║
║ │ Earned by completing tasks ║
║ │ ║
║ └───▶ Hodler Pool (what remains) ║
║ Shared based on your balance ║
║ ║
╚════════════════════════════════════════════════════════════╝
```

The fixed pool gets calculated first from your completed tasks. Whatever's left goes to the hodler pool, split among all qualified users based on their SEND balance.

---

## Your Send Ceiling: The Key to Unlocking Rewards

Here's the important part: **you must send SEND to unlock your rewards**.

Your "send ceiling" is the maximum you can earn, based on what you received last month (or the minimum balance if you're new). Every time you send SEND to someone who also has Send Earn deposits, it counts toward your progress.

```
╔═════════════════════════════════════════════════════════════╗
║ SEND CEILING ║
║ ║
║ Previous Reward (or min balance) ║
║ │ ║
║ ÷ (minimum_sends × scaling_divisor) ║
║ │ ║
║ ▼ ║
║ ┌─────────────────┐ ║
║ │ Your Ceiling │◀── Max you can send per recipient ║
║ └─────────────────┘ ║
║ ║
║ Send to 5 people ═══▶ 5 × ceiling = total send score ║
║ ║
║ Progress bar shows: send score ÷ scaled previous reward ║
║ ║
╚═════════════════════════════════════════════════════════════╝
```

**Key points:**
- Sends only count to recipients who have Send Earn deposits
- Each recipient is capped at your ceiling amount
- Your progress = how much of your potential you've activated

---

## Tasks: Earn Fixed Bonuses

Tasks give you fixed token amounts for completing specific activities:

- **Claim a Sendtag** – Required for qualification
- **Send streak** – Send SEND on the day of the task
- **Buy Sendpot tickets** – Participate in the lottery
- **Invite friends** – Refer others to earn bonuses

Each task has a fixed SEND value. Complete it, and that amount gets added to your reward.

**Remember:** Tasks must be completed each month. Your progress doesn't carry over to the next distribution.

---

## Referral Marketing: Grow Your Rewards by Inviting Friends

One of the best ways to boost your rewards is through referrals. When you invite friends to Send and they become active users, you earn bonus multipliers on your rewards.

**How Referrals Work:**

1. Share your Sendtag with friends
2. When they sign up using your referral, you're connected as their referrer
3. Once your friend qualifies for rewards (by earning a share in a distribution), your referral counts

**Boosting Your Rewards with Referrals:**

Your referrals multiply your base rewards in two ways:

1. **Monthly Referral Multiplier**: For each friend who joins and qualifies in the current month, you get a 10% boost (1.1x, 1.2x, 1.3x...) up to 2x total

2. **Total Referral Multiplier**: Your lifetime qualified referrals give you an ongoing 2% boost per referral (1.02x, 1.04x, 1.06x...) up to 2x total

**Example:**
If you refer 3 friends this month who all qualify, and you have 10 total lifetime referrals:
- Monthly boost: 1.3x (3 referrals × 0.1 each)
- Total boost: 1.20x (10 referrals × 0.02 each)
- Combined multiplier: 1.3 × 1.2 = 1.56x your base rewards!

**Tips to Maximize Referrals:**

- Share your Sendtag on social media
- Invite friends who will actively use Send
- Help your referrals complete their first transactions so they qualify for rewards
- The more friends who qualify, the bigger your multiplier grows

---

## Multipliers: Boost Your Fixed Rewards

Some tasks have multipliers that increase your fixed pool earnings:

```
╔═════════════════════════════════════════════════════════════╗
║ MULTIPLIERS ║
║ ║
║ Task with multiplier ║
║ │ ║
║ ├───▶ First completion: 1.0× ║
║ ├───▶ Second: 1.0× + step ║
║ ├───▶ Third: 1.0× + (2 × step) ║
║ └───▶ Capped at max multiplier ║
║ ║
║ Final Fixed Reward = base × (all multipliers combined) ║
║ ║
╚═════════════════════════════════════════════════════════════╝
```

Multipliers are calculated per-distribution. They don't accumulate across months.

---

## The Reward Cap

Your fixed pool reward can never exceed:

```
Initial Hodler Amount + Send Score + Sendpot Ticket Value
```

This prevents gaming the system by completing tasks without actually participating in the economy.

---

## Progress Bar: What It Really Shows

The progress bar in the app shows how much of your send ceiling you've filled:

```
┌────────────────────────────────────────────────────────────┐
│ │
│ ████████████░░░░░░░░░░░░░░░░ 45.2% │
│ │
│ = min(send_ceiling_weight, scaled_previous_reward) │
│ ÷ scaled_previous_reward │
│ │
└────────────────────────────────────────────────────────────┘
```

It doesn't show total SEND sent—it shows how much of your earning potential you've unlocked through qualifying sends.

---

## Quick Summary

1. **Qualify** – Sendtag + minimum SEND + Send Earn deposit
2. **Send** – Move SEND to eligible recipients to build your send score
3. **Complete tasks** – Earn fixed bonuses and multipliers
4. **Receive** – At month-end, claim your share from fixed + hodler pools

The more you participate, the more you earn. But remember: everything resets each month. Stay active to keep earning.
4 changes: 4 additions & 0 deletions lib/md.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { visit } from 'unist-util-visit';
import { toString } from 'mdast-util-to-string';
import GithubSlugger from 'github-slugger';
import Callout from '../components/mdx/Callout.jsx';
import CodeBlock from '../components/mdx/CodeBlock.jsx';
import Mermaid from '../components/mdx/Mermaid.jsx';
import TokenEmissions from '../components/TokenEmissions.tsx';
import FundingRounds from '../components/FundingRounds.tsx';
import Treasury from '../components/Treasury.tsx';
Expand All @@ -24,6 +26,8 @@ const SUPPORTED_EXTENSIONS = ['.mdx'];

const mdxComponents = {
Callout,
Mermaid,
code: CodeBlock,
TokenEmissions,
FundingRounds,
Treasury,
Expand Down
Loading