Skip to content

Commit

Permalink
fix: typos in documentation files (#1691)
Browse files Browse the repository at this point in the history
* Update balances.ts

* Update README.md
  • Loading branch information
maximevtush authored Feb 12, 2025
1 parent b0ba848 commit 094bc9f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/strategies/meebitsdao-delegation/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# meebitsdao-delegation

This delegation strategy returns the balances of the voters for specific ERC20 [mVOX](https://polygonscan.com/address/0x7C1a4c36D9BDa5C568f0E4877CD8E27D74Ae66c6) and ERC721 [MFND](https://polygonscan.com/address/0xc34cbca32e355636c7f52dd8beab0af2396ebd79). The calcualation is as follows: users with MFND tokens can hold voting power and can be assigned as delegates, while users with mVOX tokens can delegate votes (to those who hold MFND tokens) but cannot hold actual vote themselves. This is different from the standard Snapshot voting strategy in that votes from delegators do not count themselves, if the votes are not delegated.
This delegation strategy returns the balances of the voters for specific ERC20 [mVOX](https://polygonscan.com/address/0x7C1a4c36D9BDa5C568f0E4877CD8E27D74Ae66c6) and ERC721 [MFND](https://polygonscan.com/address/0xc34cbca32e355636c7f52dd8beab0af2396ebd79). The calculation is as follows: users with MFND tokens can hold voting power and can be assigned as delegates, while users with mVOX tokens can delegate votes (to those who hold MFND tokens) but cannot hold actual vote themselves. This is different from the standard Snapshot voting strategy in that votes from delegators do not count themselves, if the votes are not delegated.

Here is an example of parameters:

Expand Down
12 changes: 6 additions & 6 deletions src/strategies/the-graph-balance/balances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ export function getCuratorSignalledGRT(curator: Curator): number {
const signalAmount = parseFloat(deployment.signalAmount);
// we calculate the value of their signal based on the share they have
// of the total signal in the subgraph deployment
const deploymentSignalShareCoeficient = signalAmount
const deploymentSignalShareCoefficient = signalAmount
? signalledTokens / signalAmount
: 0;
result += deploymentSignalShareCoeficient * parsedSignal;
result += deploymentSignalShareCoefficient * parsedSignal;
}
// Get GRT of Curator for the name signal they have in each Deployment
for (const nameSignal of nameSignals) {
Expand All @@ -69,22 +69,22 @@ export function getCuratorSignalledGRT(curator: Curator): number {
const signalledTokens = parseFloat(deployment.signalledTokens);
const signal = parseFloat(nameSignal.signal);
const signalAmount = parseFloat(deployment.signalAmount);
const deploymentSignalShareCoeficient = signalAmount
const deploymentSignalShareCoefficient = signalAmount
? signalledTokens / signalAmount
: 0;

result += deploymentSignalShareCoeficient * signal;
result += deploymentSignalShareCoefficient * signal;
} else {
// edge case where curators didn't withdraw their signal from a deprecated subgraph
const subgraph = nameSignal.subgraph;
const withdrawableTokens = parseFloat(subgraph.withdrawableTokens);
const _nameSignal = parseFloat(nameSignal.nameSignal);
const nameSignalAmount = parseFloat(subgraph.nameSignalAmount);
const subgraphNameSignalShareCoeficient = nameSignalAmount
const subgraphNameSignalShareCoefficient = nameSignalAmount
? withdrawableTokens / nameSignalAmount
: 0;

result += subgraphNameSignalShareCoeficient * _nameSignal;
result += subgraphNameSignalShareCoefficient * _nameSignal;
}
}
// result is in wei, format it in GRT
Expand Down

0 comments on commit 094bc9f

Please sign in to comment.