Skip to content

Commit

Permalink
update raydium
Browse files Browse the repository at this point in the history
  • Loading branch information
realdealshaman committed Dec 21, 2023
1 parent 0167256 commit 2dbd57a
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions wipProtocols/raydium.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,42 @@
import { Protocol } from "../types/adapters";
import { manualLinear } from "../adapters/manual";
import { manualLinear, manualCliff } from "../adapters/manual";
import { periodToSeconds } from "../utils/time";

const totalSupply = 555_000_000; // Total RAY Supply
const RAY_TGE = 1613865600; // RAY token TGE in UNIX timestamp
const totalSupply = 555_000_000;
const RAY_TGE = 1613865600; // Sunday, February 21, 2021

// Allocations
const miningReserveAllocation = totalSupply * 0.34; // 34%
const miningReserveTotalAllocation = totalSupply * 0.34; // 34%
const partnershipEcosystemAllocation = totalSupply * 0.30; // 30%
const teamAllocation = totalSupply * 0.20; // 20%
const liquidityAllocation = totalSupply * 0.08; // 8%
const communitySeedAllocation = totalSupply * 0.06; // 6%
const advisorsAllocation = totalSupply * 0.02; // 2%

// Custom function for Mining Reserve with halving
function miningReserveVesting() {
let vestingSchedules = [];
let remainingAllocation = miningReserveTotalAllocation;
let currentStart = RAY_TGE;
const halvingPeriod = periodToSeconds.month * 6;

for (let i = 0; i < 6; i++) { // 6 periods of 6 months each
let periodAllocation = remainingAllocation / (6 - i); // Dividing remaining allocation equally among remaining periods
vestingSchedules.push(manualLinear(currentStart, currentStart + halvingPeriod, periodAllocation));

currentStart += halvingPeriod;
remainingAllocation -= periodAllocation;
}

return vestingSchedules;
}

const raydium: Protocol = {
"Liquidity": manualLinear(
"Liquidity": manualCliff(
RAY_TGE,
RAY_TGE + periodToSeconds.year * 3,
liquidityAllocation
),
"Mining Reserve": manualLinear(
RAY_TGE,
RAY_TGE + periodToSeconds.year * 3,
miningReserveAllocation
),
"Mining Reserve": miningReserveVesting(),
"Partnership & Ecosystem": manualLinear(
RAY_TGE,
RAY_TGE + periodToSeconds.year * 3,
Expand All @@ -44,16 +57,15 @@ const raydium: Protocol = {
RAY_TGE + periodToSeconds.year * 3,
advisorsAllocation
),

meta: {
token: "solana:4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R", // RAY Solana SPL address
token: "solana:4k3Dyjzvzp8eMZWUXbBCjEvwSkkk59S5iCNLY3QrkX6R",
sources: [
"https://docs.raydium.io/raydium/ray_token/the-ray-token"
],
protocolIds: ["214"],
},
categories: {
insiders: ["Advisors", "Community & Seed", "Team"],
insiders: ["Team", "Advisors", "Community & Seed"],
noncirculating: ["Partnership & Ecosystem"],
farming: ["Mining Reserve"],
liquidity: ["Liquidity"]
Expand Down

0 comments on commit 2dbd57a

Please sign in to comment.