Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup #1

Merged
merged 4 commits into from
Sep 4, 2024
Merged
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
13 changes: 13 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: CI

on: [push, pull_request]

jobs:
ci:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master

- name: Runs code QA and tests
run: docker run --rm -v "$(pwd):/app" -w /app -t node:lts-alpine sh -c 'yarn && yarn build'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.island/dist
5 changes: 5 additions & 0 deletions .island/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineConfig } from "islandjs";

export default defineConfig({
enableSpa: false,
});
17 changes: 17 additions & 0 deletions .island/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!doctype html>
<html>
<head>
<title>Aerodrome Finance Help Content</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@exampledev/[email protected]/new.min.css"
/>
</head>

<body>
<div id="root"></div>
</body>
</html>
16 changes: 16 additions & 0 deletions .island/theme/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Content } from "islandjs/runtime";
import { Layout as DefaultLayout } from "islandjs/theme";

function Layout() {
return (
<div>
<Content />
</div>
);
}

const HomeLayout = () => <div />;
const NotFoundLayout = () => <div>404</div>;
const setup = () => {};

export { Layout, HomeLayout, NotFoundLayout, setup };
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
# docs
Aerodrome Finance Help Content
# Aerodrome Finance Help Content

The content available here is used for the contextual help in various screens
across the web app.

## Development

To contribute please make changes to the MDX files under the `content/` folder.

To review your changes, start the local preview server by running:

```
yarn && yarn dev
```

Before submitting the changes, please run the linter:

```
yarn && yarn lint
```

Thank you!
1 change: 1 addition & 0 deletions content/.island

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this for the build step?

Copy link
Contributor Author

@stas stas Aug 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't want to keep the islandjs stuff inside the content folder so I moved it out and left just a symlink

112 changes: 112 additions & 0 deletions content/emissions.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
import { Chart } from "react-google-charts";

# Emissions

The initial supply of `$AERO` is 500M, with 450M distributed as vote-locked
(`$veAERO`) tokens.

Weekly emissions will being at 10M `$AERO` (2% of the initial supply). The
emission schedule will follow three phases:

**Take-off**: During the first 14 weeks (epochs), emissions will increase at 3% per
week, allowing for rapid growth in protocol activity and partner onboarding.

**Cruise**: After Epoch 14, emissions will decay at 1% per epoch, ensuring total
supply inflation decreases over time as the protocol matures.

**Aero Fed**: When emissions programmatically drop under 9M per epoch,
approximately Epoch 67, veAERO voters will take control of Aerodrome's monetary
policy through the Aero Fed system. Voters will collectively make one of three
choices each epoch:

- Increase emissions by 0.01% of total supply (0.52% annualized)
- Decrease emissions by 0.01% of total supply (0.52% annualized)
- Maintain emissions unchanged as a % of total supply

The winning vote will be determined by simple majority vote. If an Increase or Decrease is selected, the emission rate will change one full epoch after the vote. A max emission rate will be set at 1% of total supply per week (52% annualized) and a minimum rate at 0.01% per week (0.52% annualized).

## Rebase

`$veAERO` holders receive a rebase proportional to `$AERO` emissions and to the
ratio of `$veAERO` to `$AERO` supply, reducing vote power dilution for
`$veAERO`!

<br />

The weekly rebase amount is calculated with the following formula:

> rebase = weeklyEmissions × (1 - veAERO.totalSupply ÷ AERO.totalsupply)ˆ2 × 0.5

This rebase formula will reward `$veAERO` holders most when locking rates
decrease, incentivizing new lockers to step in. `$veAERO` supply does not
affect weekly emissions distributed to liquidity providers.

<br />

## Projected Emission Schedule

**Note**: _projection below uses a 40% emissions lock rate and assumes Aero Fed keeps emissions constant_.

<br />

<Chart
chartType="LineChart"
data={[
["Epoch", "LP Emissions", "veAERO Rebase", "Total Supply"],
["1", 10, 0.05, 500],
["15", 15, 0.4, 675],
["30", 13, 0.65, 895],
["67", 9, 0.7, 1325],
["100", 9, 0.8, 1645],
]}
options={{
title: "AERO Emissions, M",
curveType: "function",
aggregationTarget: "series",
selectionMode: "multiple",
series: {
0: { targetAxisIndex: 0 },
1: { targetAxisIndex: 0 },
2: { targetAxisIndex: 1 },
},
vAxes: {
1: { title: "Total Supply", titleTextStyle: { color: "#666" } },
0: { title: "Distribution", titleTextStyle: { color: "#666" } },
},
hAxis: {
title: "Epoch",
titleTextStyle: { color: "#000" },
},
backgroundColor: "#EBE9E4",
lineWidth: 3,
colors: ["#79F8DB", "#2180DF", "#EA1000", "#59BFD8", "#0281FF"],
legend: { textStyle: { color: "#666" } },
titleTextStyle: { color: "#666" },
}}
width={"100%"}
height={"600px"}
/>

<br />

## Emission Rewards

Each epoch, `$AERO` emissions are distributed to liquidity pools proportionally
to the `$veAERO` voting power the pools receive.

Liquidity providers (LPs) can stake their LP positions to receive a share of
the `$AERO` distributed to each pool proportionally to the size of positions
and time staked.

These rewards are distributed during the whole epoch and available for claiming
as these accrue.

## Team Emissions

While a fully autonomous and immutable protocol is an admirable objective, it
comes at a cost. Aerodrome will ensure its long-term sustainability by
employing a dedicated team focused on supporting the product decentralization,
documentation, community, and ecosystem.

To cover ongoing expenses and all the upcoming development efforts, 5% of the
emissions will be going to the team address.
62 changes: 62 additions & 0 deletions content/feesandbribes.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { Chart } from "react-google-charts";

# Voter Rewards

## Fees

Token pairs capture fees from the volume enabled by the liquidity in each pool.

The fees collected by staked LPs the previous epoch are deposited as incentives
for the current voting epoch.

Fee rewards are distributed in the same tokens as the liquidity pool tokens
these originate from (e.g., if the pool is `vAMM-AERO/USDC` the distributed
tokens are `$AERO` and `$USDC`).

Fee rewards are distributed as accrued and can be claimed at any time. Fee rewards deposited as voter incentives are available for claim after the epoch changes (Thursday 00:00 UTC), and are distributed proportionally to the voting power cast by a voter (`$veAERO`).

## Incentives

In addition to fee rewards, liquidity pools can receive external voter rewards from protocols or other participants (known as _incentives_). Incentives can be deposited for _whitelisted_ tokens and are distributed _only_ to voters on that pool, proportionally to their share of pool votes.

These rewards are available for claim after the epoch epoch changes (Thursday 00:00 UTC), and are distributed proportionally to the voting power cast by a voter (`$veAERO`).

## Rewards claim

Rebase rewards are claimable after a new epoch has started (Thursday 00:00 UTC).

An example of incentives, voting, and rewards claim timeline:

- A new epoch starts Thursday (00:00 UTC)
- Incentives are deposited at any point in the epoch
- Voters vote for their preferred pools
- Once the next epoch arrives (the following Thursday), users are able to claim rewards

<Chart
chartType="Timeline"
data={[
[
{ type: "string", id: "Voting Round" },
{ type: "string", id: "Action" },
{ type: "date", id: "Start" },
{ type: "date", id: "End" },
],
["Round #1", "Incentives Deposited (incl. Fees from previous Epoch), Votes Cast", new Date(2022, 5, 2), new Date(2022, 5, 8, 23, 59)],
["Round #1", "Rewards Claimable", new Date(2022, 5, 9), new Date(2022, 5, 30)],

["Round #2", "Incentives Deposited (incl. Fees from previous Epoch), Votes Cast", new Date(2022, 5, 9), new Date(2022, 5, 15, 23, 59)],
["Round #2", "Rewards Claimable", new Date(2022, 5, 16), new Date(2022, 5, 30)],

["Round #3", "Incentives Deposited (incl. Fees from previous Epoch), Votes Cast", new Date(2022, 5, 16), new Date(2022, 5, 22, 23, 59)],
["Round #3", "Rewards Claimable", new Date(2022, 5, 23), new Date(2022, 5, 30)],

]}
options={{
title: "Incentives, Voting and Rewards Timeline",
colors: [
'#79F8DB', '#2180DF', '#EA1000', '#871000', '#59BFD8', '#0281FF',
'#FBBF42', '#EDE7DB'
],
}}
width={"100%"}
/>
37 changes: 37 additions & 0 deletions content/helpers.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* Formatting helpers for MDX Provider
*/
const MDXComponents = {
h1: (props) => (
<h1 className="mb-6 text-2xl text-gray-600 dark:text-gray-400" {...props} />
),
h2: (props) => (
<h2
className="mb-2 mt-6 text-xl text-gray-600 dark:text-gray-400"
{...props}
/>
),
h3: (props) => (
<h3
className="mb-2 mt-6 text-xl text-gray-600 dark:text-gray-400"
{...props}
/>
),
h4: (props) => (
<h4
className="mb-2 mt-6 text-xl text-gray-600 dark:text-gray-400"
{...props}
/>
),
p: (props) => <p className="mb-4" {...props} />,
ul: (props) => <ul className="mb-8 list-inside list-disc" {...props} />,
ol: (props) => <ol className="mb-8 list-inside list-decimal" {...props} />,
blockquote: (props) => (
<blockquote
className="my-4 border-l italic opacity-70 pl-4 text-gray-600 dark:text-gray-400"
{...props}
/>
),
};

export { MDXComponents };
22 changes: 22 additions & 0 deletions content/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Aerodrome Finance Help Content

The sections available here are used for the contextual help in various screens
across the web app.

- [Introduction](intro)
- [Tokenomics](tokenomics)
- [Liquidity / Pools](liquidity)
- [Emissions](emissions)
- [Voting](voting)
- [Fees and Incentives](feesandbribes)
- [Relay](relay)

Misc

- [Security](security)
- [Legal](legal)

---

**Note:** the assets are not available yet. We are working on open sourcing
these too.
39 changes: 39 additions & 0 deletions content/intro.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { SvgLoader } from "react-svgmt";

# About Aerodrome

Aerodrome Finance is a next-generation AMM designed to serve as Base's central
liquidity hub, combining a powerful liquidity incentive engine, vote-lock
governance model, and friendly user experience. Aerodrome inherits the latest
features from Velodrome V2.

Aerodrome launched on <strong>28th of August, 2023</strong> on BASE network.

## Aerodrome Mechanics

<SvgLoader
path="/svg/info-graph.svg"
className="text-gray-900 dark:hidden mt-12 w-full"
viewBox="0 0 560 500"
preserveAspectRatio="xMidYMid meet"
/>
<SvgLoader
path="/svg/info-graph-dark.svg"
className="text-white hidden dark:block mt-12 w-full"
viewBox="0 0 560 500"
preserveAspectRatio="xMidYMid meet"
/>

1. The protocol is designed to enable token swaps and generate fees (from
**Traders**) by attracting liquidity.
2. Every epoch liquidity providers (**LPs**) receive `$AERO` token
emissions proportionally to the votes the pools accumulate.
Only staked (in the protocol gauges) liquidity receive emissions.
3. Participants can lock their `$AERO` to be able to vote
on the next epoch distribution of emissions, becoming **veAERO Voters**.
4. **veAERO Voters** are rewarded (proportionally to locked amounts) for their
votes with 100% of the protocol trading fees from the previous epoch and any
additional voters incentives from the current epoch.
5. An epoch is a 7-day period. It starts every Thursday at 00:00 UTC and ends
Wednesday at 23:59 UTC. Votes, emissions, fees, and incentives are
calculated for each epoch.
Loading