replaced subgraph with ponder
This commit is contained in:
parent
5e6e21878c
commit
ba64e725dc
45 changed files with 386 additions and 7275 deletions
|
|
@ -211,16 +211,17 @@ watchEffect(() => {
|
|||
stakeSlots.value = (supplyFreeze.value * 1000)?.toFixed(2);
|
||||
});
|
||||
|
||||
// const stakeAbleHarbAmount = computed(() => statCollection.harbTotalSupply / 5n);
|
||||
// const stakeAbleHarbAmount = computed(() => statCollection.kraikenTotalSupply / 5n);
|
||||
//war das mal so, wurde das geändert --> funktioniert nicht mehr
|
||||
// const minStake = computed(() => stakeAbleHarbAmount.value / 600n);
|
||||
|
||||
|
||||
const tokenIssuance = computed(() => {
|
||||
if (statCollection.harbTotalSupply === 0n) {
|
||||
if (statCollection.kraikenTotalSupply === 0n) {
|
||||
return 0n;
|
||||
}
|
||||
|
||||
return (statCollection.nettoToken7d / statCollection.harbTotalSupply) * 100n;
|
||||
return (statCollection.nettoToken7d / statCollection.kraikenTotalSupply) * 100n;
|
||||
});
|
||||
|
||||
function getMinFloorTax() {
|
||||
|
|
@ -280,7 +281,7 @@ onMounted(async () => {
|
|||
}
|
||||
});
|
||||
// async function getGraphData(): Promise<Array<any>> {
|
||||
// let res = await axios.post("https://api.studio.thegraph.com/query/47986/harb/version/latest", {
|
||||
// let res = await axios.post("http://127.0.0.1:42069/graphql", {
|
||||
// query: "query MyQuery {\n positions {\n id\n lastTaxTime\n owner\n share\n status\n taxRate\n creationTime\n }\n}",
|
||||
// });
|
||||
// return res.data.data.positions;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ console.log("minStake", minStake.value);
|
|||
return formatBigIntDivision(minStake.value, 10n ** 18n);
|
||||
});
|
||||
|
||||
const stakeAbleHarbAmount = computed(() => statCollection.harbTotalSupply / 5n);
|
||||
const stakeAbleHarbAmount = computed(() => statCollection.kraikenTotalSupply / 5n);
|
||||
|
||||
const minStake = computed(() => stakeAbleHarbAmount.value / 600n);
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ const statCollection = useStatCollection();
|
|||
const snatchPositions = computed(() => {
|
||||
if (
|
||||
bigInt2Number(statCollection.outstandingStake, 18) + stake.stakingAmountNumber <=
|
||||
bigInt2Number(statCollection.harbTotalSupply, 18) * 0.2
|
||||
bigInt2Number(statCollection.kraikenTotalSupply, 18) * 0.2
|
||||
) {
|
||||
return [];
|
||||
}
|
||||
|
|
@ -44,7 +44,7 @@ if (
|
|||
const difference =
|
||||
bigInt2Number(statCollection.outstandingStake, 18) +
|
||||
stake.stakingAmountNumber -
|
||||
bigInt2Number(statCollection.harbTotalSupply, 18) * 0.2;
|
||||
bigInt2Number(statCollection.kraikenTotalSupply, 18) * 0.2;
|
||||
console.log("difference", difference);
|
||||
|
||||
//Division ohne Rest, um zu schauen wie viele Positionen gesnatched werden könnten
|
||||
|
|
|
|||
|
|
@ -162,14 +162,14 @@ async function loadActivePositionData() {
|
|||
|
||||
const multiplier =
|
||||
Number(formatUnits(props.position.totalSupplyInit, 18)) /
|
||||
Number(formatUnits(statCollection.harbTotalSupply, 18));
|
||||
Number(formatUnits(statCollection.kraikenTotalSupply, 18));
|
||||
console.log("props.position.totalSupplyInit", props.position.totalSupplyInit);
|
||||
|
||||
console.log("multiplier", multiplier);
|
||||
|
||||
profit.value =
|
||||
Number(formatUnits(statCollection.harbTotalSupply, 18)) * multiplier -
|
||||
Number(formatUnits(statCollection.harbTotalSupply, 18));
|
||||
Number(formatUnits(statCollection.kraikenTotalSupply, 18)) * multiplier -
|
||||
Number(formatUnits(statCollection.kraikenTotalSupply, 18));
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue