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

feat(apps): Spool.fi v2 support #3082

Closed
wants to merge 2 commits into from
Closed

Conversation

amikec
Copy link
Contributor

@amikec amikec commented Nov 27, 2023

Description

Spool.fi v2 app (https://app.spool.fi/) integration

Checklist

  • I have followed the Contributing Guidelines
  • (optional) As a contributor, my Ethereum address/ENS is: 0xe15bE0Ba50f87b6B975b85A0d31297dd2dF683bE
  • [] (optional) As a contributor, my Twitter handle is:

How to test?

@wpoulin
Copy link
Contributor

wpoulin commented Nov 27, 2023

Would it be possible to fully rely on contract calls instead of relying on external data source like subgraphs ?

@tadej-solidant tadej-solidant force-pushed the feat/spool-v2 branch 2 times, most recently from cb64f6a to f64ff9c Compare November 29, 2023 13:15
@amikec amikec changed the title feat(apps): Spool.fi v2 support WIP: feat(apps): Spool.fi v2 support Nov 30, 2023
@amikec
Copy link
Contributor Author

amikec commented Nov 30, 2023

Would it be possible to fully rely on contract calls instead of relying on external data source like subgraphs ?

Unfortunately it's not possible, we rely on emitted events as well to compute some data points.
I've set the PR to WIP, we'll work on adding the position balance method.

async getPrice() {
return 0; // Valueless token
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Heads'up; We currently filter out balances < 0.01 $

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the heads up; we'd still prefer to keep the position in the API response, even if it's not displayed on the studio app.

endpoint: SUBGRAPH_V1_API_BASE_URL,
query: SPOOL_STAKED_QUERY,
variables: { address },
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Look like you can call balanceOf on 0xc3160c5cc63b6116dd182faa8393d3ad9313e213 to get staked balance

Copy link
Contributor Author

Choose a reason for hiding this comment

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

balanceOf number is a bit off - some users inadvertently transferred their tokens directly to the contract, instead of using the correct function to stake.

return rewards.toString();
});

return [stakedAmount, votingPowerRaw.toString(), ...rewardBalances];
Copy link
Contributor

Choose a reason for hiding this comment

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

since voSpool is a valuless token it won't ever be displayed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the heads up; we'd still prefer to keep the position in the API response, even if it's not displayed on the studio app.

@amikec amikec changed the title WIP: feat(apps): Spool.fi v2 support feat(apps): Spool.fi v2 support Dec 29, 2023
@amikec amikec changed the title feat(apps): Spool.fi v2 support WIP: feat(apps): Spool.fi v2 support Dec 29, 2023
@amikec amikec changed the title WIP: feat(apps): Spool.fi v2 support feat(apps): Spool.fi v2 support Jan 23, 2024
@wpoulin
Copy link
Contributor

wpoulin commented Jan 24, 2024

We are closing Zapper Studio to new contributions. Instead, we'll be rolling out codeless app balance integrations, where folks can create integrations on Zapper's frontend (with no coding experience needed)

Here's the official announcement. I'll add Spool.fi v2 to my todo since codeless app integrations aren't open to public just yet. I'll close this PR and let me know if there's anything else
Thanks for your contribution !

@wpoulin wpoulin closed this Jan 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants