Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #130 from morpho-org/feat/add-age8-distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-devatom authored Oct 3, 2023
2 parents c720126 + df2df5a commit 0d2c269
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 2 deletions.
63 changes: 62 additions & 1 deletion src/age-epochs.json
Original file line number Diff line number Diff line change
Expand Up @@ -374,5 +374,66 @@
}
]
}
},
{
"id": "age8",
"initialTimestamp": "2023-10-04T15:00:00.000Z",
"finalTimestamp": "2023-11-18T15:00:00.000Z",
"distributionScript": "simpleVoteDistribution",
"discussion": "https://forum.morpho.org/t/mip-morpho-rewards-age-8/354",
"distributionParameters": {
"totalEmission": "800000",
"marketsRepartition": [
{
"symbol": "aDAI",
"market": "0x028171bCA77440897B824Ca71D1c56caC55b68A3",
"weight": 250
},
{
"symbol": "aWETH",
"market": "0x030bA81f1c18d280636F32af80b9AAd02Cf0854e",
"weight": 4090,
"sideDistribution": {
"type": "static",
"params": {
"supplySide": 5000,
"borrowSide": 5000
}
}
},
{
"symbol": "aUSDC",
"market": "0xBcca60bB61934080951369a648Fb03DF4F96263C",
"weight": 1030
},
{
"symbol": "aUSDT",
"market": "0x3Ed3B47Dd13EC9a98b44e6204A523E766B225811",
"weight": 750
},
{
"symbol": "aWBTC",
"market": "0x9ff58f4fFB29fA2266Ab25e75e2A8b3503311656",
"weight": 730
},
{
"symbol": "cUSDT",
"market": "0xf650C3d88D12dB855b8bf7D11Be6C55A4e07dCC9",
"weight": 500
},
{
"symbol": "aWETHV3",
"market": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"weight": 2650,
"sideDistribution": {
"type": "static",
"params": {
"supplySide": "10000",
"borrowSide": "0"
}
}
}
]
}
}
]
]
3 changes: 2 additions & 1 deletion src/ages/distributionScripts/simpleVoteDistribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ const simpleVoteDistribution = async ({
if (sideDistribution) {
if (sideDistribution.type !== "static") throw Error("Only static size distribution is supported for now");
const { supplySide, borrowSide } = sideDistribution.params;
if (!supplySide || !borrowSide) throw Error("Missing supply or borrow size distribution params");
if (supplySide === undefined || borrowSide === undefined)
throw Error("Missing supply or borrow size distribution params");
const morphoEmittedSupplySide = PercentMath.percentMul(emissionRatePerEpoch, supplySide);
const morphoRatePerSecondSupplySide = morphoEmittedSupplySide.div(duration);
const morphoEmittedBorrowSide = PercentMath.percentMul(emissionRatePerEpoch, borrowSide);
Expand Down

0 comments on commit 0d2c269

Please sign in to comment.