Coder Social home page Coder Social logo

dhedge-docs's People

Contributors

radek1st avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dhedge-docs's Issues

[Bounty] Integrate dHEDGE in Mask plugin

Prize Title

Integrate dHEDGE in Mask plugin

Prize Bounty

5000 USDC

Part 1: Problem Description

Background

On one side there's many KOL/Managers on twitter, and on the other side there's many pools on dHEDGE and we would like to find a way to link it together:
Twit: https://twitter.com/dHedgeOrg/status/1375554472345174016
KOL/Manager: https://twitter.com/PerceptronCap
Pool: https://app.dhedge.org/pool/0x3a4851597f36f459b58e65c55c8f3a8710313fc7
Pool Token: https://etherscan.io/token/0x3a4851597f36f459b58e65c55c8f3a8710313fc7

Solution

Create a new dHEDGE plugin that similar to the current Gitcoin plugin, which will detect links from https://app.dhedge.org/pool instead of https://gitcoin.co/grants and show the pool information, trade to invest with SUSD and plot the chart using the existing Mask chart plugin to be consistent.

There would be 3 tabs:

  • The first tab would be the basic pool info. such as pool name, managed by, strategy, last active, AUM, return, fees and risk factor. With an invest button align with the current Gitcoin plugin. Donate button would be the Invest button. Before clicking the invest there's Enable button for approving the SUSD token as in reference image. After clicking invest would pops up to invest with SUSD. And there would be a link with Get SUSD which jumps to the second tab.

image

image

image

  • Second tab would be the Mask trading widget for user to get SUSD

image

  • Third tab would be the pool chart which uses Mask chart plugin to keep it consistent.

image

Part 2: Resources

Part 3: Contact and Support

Submission Requirements

Please include demo to show the integration is working.

Winner Announcement Date

Winners will be announced at the conclusion of Open Defi Hackathon

Judging Criteria

  • Have a working demo.
  • Clean code & tech design
  • Clear UI, easy to use and generally good user experience

[Bounty] Upgrade dHEDGE in Mask plugin to V2

Prize Title

Upgrade dHEDGE in Mask plugin to V2

Prize Bounty

$2500 ($1250 Mask from Mask Network and $1250 DHT from dHEDGE)

Part 1: Problem Description

Background

Staging URL: https://dh-pre-prod.web.app

Example Polygon pool: https://dh-pre-prod.web.app/pool/0x09b99c546acfc7b355a9ebec58bf1e83a04b0acd

Solution

Steps:
1: get poolManagerLogic address from a pool address (pool address should be from the URL same as V1) :
poolManagerLogic = await PoolLogic.attach(pool).poolManagerLogic();
This will detect if it's Polygon pool as on ETH V1 there's no method poolManagerLogic()
2: get deposit assets from poolManagerLogic:
await poolManagerLogic.getDepositAssets();
3: select from the drop down of the available deposit assets and deposit:
await PoolLogic.attach(pool).deposit(asset, amount);
4: get xxx option from Sushiswap

Part 2: Resources

Part 3: Contact and Support

Submission Requirements

Please include demo to show the integration is working.

Winner Announcement Date

Winners will be announced at the conclusion of Open Defi Hackathon

Judging Criteria

  • Have a working demo.
  • Clean code & tech design
  • Clear UI, easy to use and generally good user experience

[Bounty] Automated trading strategy on dHEDGE V2

Prize Title

Create an automated trading strategy on-top of dHEDGE V2 Polygon pools utilizing the new dHEDGE V2 SDK.

Prize Bounty

$5000 USDC

Part 1: Problem Description

Background

The rollout of dHEDGE V2 allows for new types of strategies that managers and traders can explore by leveraging Polygon and Sushiswap. To give developers an easy to to integrate with the V2 protocol, we've released the v2-sdk npm package. Feel free to read about the V2 SDK in our Medium post.

Some ideas you may want to think about integrating are: Chainlink price feeds, prices/ratios of Sushiswap pools, Yield Farm APY's on Sushiswap, etc. To help get started, you can also take a look at our v2-sdk example boilerplate repo for getting an idea of how to start working with the V2 SDK with Express.

Example: The dHEDGE Stablecoin Yield Pool utilizes the V2 SDK to automate a stable yield strategy. With a focus on optimizing stablecoin yields, this pool will switch farming pools when higher stable yield opportunities arise over time, ensuring optimal performance.

Solution

  1. The automated strategy/bot should be running autonomously (node.js/express deployment)
  2. The automated strategy should clearly outline the intent of the strategy and what it is trying to achieve
  3. Depending on the specific strategy, the bot should successfully be executing transactions (trading/LP'ing/staking) according to automated strategy logic

*Note: if your automated strategy is doing well, investors may eventually find themself wanting to park their capital with your pool allowing you to earn manager fees.

Part 2: Resources

Part 3: Contact and Support

Submission Requirements

Please include a link to your Pool

Winner Announcement Date

Winners will be announced at the conclusion of Open Defi Hackathon

Judging Criteria

  • Have a clearly defined automated strategy
  • Have a working automated strategy live on dHEDGE V2 (Polygon)
  • Clean code & tech design

[Bounty] Create Dune Analytics Dashboard with dHEDGE V1 data on Ethereum

Prize Title

[Bounty] Create Dune Analytics Dashboard with dHEDGE V1 data on Ethereum

Prize Bounty

$3000 USDC

Challenge Description

Create a dashboard with dHEDGE V1 data on Dune Analytics on Ethereum similar to the dashboard for mStable here https://dune.xyz/derc/mta-community. Including the following but not limited data:

  • TVL for all pools
  • Unique investor Addresses for all pools
  • Unique manager addresses for all pools
  • Unique assets and value for all pools
  • Total trading fees - Treasury DAO: 0xff44b48abad9cb7a2485f829e5c9a4d1cee623c9

dHEDGE Factory on Ethereum mainnet: 0x03D20ef9bdc19736F5e8Baf92D02C8661a5941F7

Contract public repo: https://github.com/dhedge/dhedge-contracts

dHEDGE Factory ABI: https://drive.google.com/file/d/1NCRm-OsU7EX87yaUoC-uyvL6zlq2kTrl/view?usp=sharing

Submission Requirements

Please include a link to the dashboard

Judging Criteria

Valid submission requires showing Dune Analytics dashboard including but not limited the above data.

Winner Announcement Date

Winners will be announced at the conclusion of Open Defi Hackathon

[Bounty] Add new data for dHEDGE Pools in the subgraph

Prize Title

Add new data for dHEDGE Pools in the subgraph

Prize Bounty

5000 USDC (ERC20)

Challenge Description

At the moment, a Pool's performance (%) on dHEDGE is calculated via our internal backend API. Ideally, this data should be accessible to any developer so the protocol could be adopted in more front-ends/other systems.

Solution

The dHEDGE Subgraph needs a new variable performance to be added onto the Pool entity.

Performance should represent the pool manager’s trading performance, adjusted for any pending fees and direct transfers of synthetic assets into the pool.

Performance should track the pool's trading performance as a big integer, where:

  • 1e18 = 0% return
  • 2e18 = +100% return
  • 5e17 = -50% return

Calculations

Performance calculation is as follows:

pool.performance = pool.fundValue / ( pool.totalSupply + pool.availableManagerFee ) * pool.performanceFactor

Variables

pool.availableManagerFee = pool.availableManagerFee()

pool.availableManagerFee

  • Calculation should take into account the available manager fee. This is any performance fee owed to the manager as additional pool tokens which can be minted at any time for good trading performance.

pool.fundValue & pool.totalSupply

  • These variables are already available in the subgraph.

pool.performanceFactor

  • If there is a direct transfer of Synthetix synth ERC20s into the pool, the pool's performance should remain unchanged.
  • To account for this, add another new pool variable, performanceFactor.
  • performanceFactor can start at value 1, and decrease towards 0 if there is any value directly transferred into the pool.
  • On pool creation: pool.performanceFactor = 1;
  • If there is a direct transfer of Synthetix ERC20s (eg. sUSD, sETH), which bypass the smart contract deposit / withdraw functions, then the performanceFactor needs to be adjusted to take into account the direct deposit to reflect the true performance from the manager's trades.

The formula for adjusting performanceFactor is as follows:

  • If there is a Synthetix synth ERC20 direct transfer into the pool (not using the pool contract deposit() method),
  • Then: new performanceFactor = performanceFactor * fundValue / (fundValue + valueDeposited)
    • valueDeposited = dollar value of the synth deposit (could be sUSD, sETH, sBTC, etc)`

Without Performance Factor:

  • Manager starts a pool and seeds it with $100 sUSD (Performance Factor = 1)
  • Manager direct deposits another $100 sUSD (Performance Factor = 1)
  • The pool performance is now +100%
  • This is Not a true reflection of the pool's trading performance.

With Performance Factor:

  • Manager starts a pool and seeds it with $100 sUSD (Performance Factor = 1)
  • Manager direct deposits another 100 sUSD (The subgraph detects the sUSD direct deposit and decreases the Performance Factor from 1 to 0.5)
  • The pool performance is still 0%
  • This Is a true reflection of the pool's trading performance.

Submission Requirements

A valid submission would be a demo showcasing the accurate performance of Pools queried by the subgraph. The dhedge subgraph can be forked and re-deployed under participants own account on The Graph.

Judging Criteria

  • Meets the tech requirements
  • Clean code

Winner Announcement Date

Winners will be announced at the conclusion of Open-Defi hackathon

Resources

[Bounty] Create Dune Analytics Dashboard with dHEDGE V2 data on Polygon

Prize Title

[Bounty] Create Dune Analytics Dashboard with dHEDGE V2 data on Polygon

Prize Bounty

$3000 USDC

Challenge Description

Create a dashboard with dHEDGE V2 data on Dune Analytics similar to the dashboard for mStable here https://dune.xyz/derc/mta-community. Including the following but not limited data:

  • TVL for all pools
  • Unique investor Addresses for all pools
  • Unique manager addresses for all pools
  • Unique assets and value for all pools
  • Total trading fees - Treasury DAO: 0x6f005cbceC52FFb28aF046Fd48CB8D6d19FD25E3

V2 Public Repo: https://github.com/dhedge/V2-Public
V2 published addresses: https://github.com/dhedge/V2-Public/blob/master/publish/matic/versions.json#L338

Submission Requirements

Please include a link to the dashboard

Judging Criteria

Valid submission requires showing Dune Analytics dashboard including but not limited the above data.

Winner Announcement Date

Winners will be announced at the conclusion of Open Defi Hackathon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.