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

feat(app): add Mean Finance integration #753

Merged
merged 8 commits into from Jun 28, 2022

Conversation

FiboApe
Copy link
Contributor

@FiboApe FiboApe commented Jun 24, 2022

Description

Adds Mean Finance integration with its DCA Positions. Mean Finance is the state-of-the-art DCA open protocol that enables users (or dapps) to Dollar Cost Average (DCA) any ERC20 into any ERC20 with their preferred period frequency, without sacrificing decentralization or giving up personal information to any centralized parties. We do all of this by leveraging both Chainlink and Uniswap V3 TWAP oracles.

More info on our docs

Checklist

  • I have followed the Contributing Guidelines
  • (optional) As a contributor, my Ethereum address/ENS is: fiboape.eth
  • (optional) As a contributor, my Twitter handle is: @FiboApe

How to test?

http://localhost:5001/apps/mean-finance/balances?addresses[]=0x7AfB052ae7B80aAc6e559281cC261089738b66F6&network=polygon
http://localhost:5001/apps/mean-finance/balances?addresses[]=0xf488aaf75D987cC30a84A2c3b6dA72bd17A0a555&network=optimism

Can add more addresses if needed :)

Copy link
Contributor

@immasandwich immasandwich left a comment

Choose a reason for hiding this comment

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

Please prefix the contracts in mean-finance/contracts/abis with mean-finance, i.e.: mean-finance-hub.json.

This will make it easier to find files in this repo as it continues to grow!

id: 'mean-finance',
name: 'Mean Finance',
description:
'Our protocol enables users to Dollar Cost Average (DCA) any ERC20 into any ERC20 with their preferred period frequency.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove "our". The description should not be from the perspective of the protocol contributor, but rather as a third party. i.e.: "Mean Finance enables users to ..."

Copy link
Contributor

@immasandwich immasandwich left a comment

Choose a reason for hiding this comment

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

Overall looks great, but are you able to create contract positions for this protocol? i.e.: is there a contract that serves as the entrypoint for funds into your DCA positions?

If so, its better to have it listed via a ContractPositionFetcher since that will enable us to calculate TVL, determine the number of users in your protocol, etc.

@immasandwich
Copy link
Contributor

OK I see that Mean Finance maintains positions via NFT tokens deposited through the DCA Hub. You can create a ContractPosition representing a deposit to the DCA Hub (https://optimistic.etherscan.io/address/0x059d306a25c4ce8d7437d25743a8b94520536bd5).

You don't need to use this ContractPosition in the balance fetcher, but this will enable Zapper to perform the optimizations mentioned earlier, and also enable us to calculate the TVL of Mean Finance for a neat upcoming feature.

@FiboApe FiboApe force-pushed the add-mean-finance-positions branch from 3e80d50 to 4c169ed Compare June 27, 2022 20:58
@FiboApe
Copy link
Contributor Author

FiboApe commented Jun 27, 2022

@immasandwich thank you for the review! All is up to date now

@immasandwich immasandwich merged commit 516ae1a into Zapper-fi:main Jun 28, 2022
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.

None yet

2 participants