GetUnite / liquidity-direction-protocol

10 stars 2 forks source link

IIbAlluo & IbAlluoUSD #17

Closed 0xtuytuy closed 2 years ago

0xtuytuy commented 2 years ago

Summary

  1. Name: Interest Bearing $LPALLUO - Interface & IbAlluoUSD
  2. About: new version of the ALLUO LP which represent a share of the total value deposited (TVD)

Is your proposal related to a problem?

No problem, just improvement in gas cost of most operations that today require the claim function to be called.

Describe the solution you'd like

We need to build a standard interface that can be used to build multiple ibAlluo and build the first iteration of this new token for USD stable coins.

The interface should cater to this logic:

The interface should be based on ERC20 so that the mobile app can call getBalance(), transfer(), etc. to perform all normal operations.

Admin of the contract should be set to Gnosis Multisig: https://gnosis-safe.io/app/matic:0x2580f9954529853Ca5aC5543cE39E9B5B1145135/balances

This token should be tested and deployed on Polygon to replace the current implementation: https://polygonscan.com/address/0x29c66cf57a03d41cfe6d9ecb6883aa0e2aba21ec#code

Ideally, we should be able to Upgrade the current implementation to avoid any migration issue and transfer of state.

Additional context

This will be used by the rest of the protocol and future features like Leverage.

HarryTgerman commented 2 years ago

@0xtuytuy had chance to look at the Issue. The users IbTokens should not auto compound anymore like it is atm when calling claim? However withdraw() will send back your underlying of choice + intrest over time?

Converting deposited asset to Target Token requires exchange address + interface. Are you planning to publish the alluo-exchange repo to npm?

0xtuytuy commented 2 years ago

@0xtuytuy had chance to look at the Issue. The users IbTokens should not auto compound anymore like it is atm when calling claim? However withdraw() will send back your underlying of choice + intrest over time?

Correct, the idea here is that we get rid of the claim() logic.

When you are given 100 IbAlluo it represents your share of the TVL. So the quantum of IbAlluo you have does not actually change (expect if you deposit more) the SC just keeps track of its value given the advertised APY.

The most important part of this task howver is the Interface / library, something we can reuse for other IbAlluo.

Converting deposited asset to Target Token requires exchange address + interface. Are you planning to publish the alluo-exchange repo to npm?

There is no real need to publish to npm, with the latest NPM versions, you are able to reference to public github repos to instal packages:

"dependencies" : { "name1" : "git://github.com/user/project.git#commit-ish", "name2" : "git://github.com/user/project.git#commit-ish" }

The challenge here is also how do you deal with changes in the APY.

gitcoinbot commented 2 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 264 years, 8 months from now. Please review their action plans below:

1) pentatonictritones has started work.

Hi, had a look through your current AlluoLPUpgradable.sol that I understand you are trying to optimise.

From what I understand,

You want to remove the claim() with a way to checkup on the user’s interest over time in a view function + only calculate / payout interest when withdraw() is called.

I’m not entirely sure what you mean by converting the deposit using alluo exchange. Am I correct in thinking that the current implementation of deposit is what you mean? Aka sending it to ‘wallet’ address set by alluo? Or do you mean bridging the funds to an L2?

Excluding this last point about the deposit, if it’s writing a single contract for the AlluoLP token with the interest functionalities, then I can complete it in a week, including hardhat tests in TS.

Learn more on the Gitcoin Issue Details page.

pentatonictritones commented 2 years ago

Hi,

I saw that someone else initiated a PR but I don't see anyone else working on this on gitcoin. Is this bounty still up for grabs? I've written some code that addresses your requests whilst fixing some interest rate issues you currently have as well as the PR has.

I need more time to rigorously test it but I'd appreciate confirmation that the bounties for the two ibAlluo + ibAlluoEUR are still up for grabs before I put in any extra time.

Thanks

gitcoinbot commented 2 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 390.0 USDC (390.0 USD @ $1.0/USDC) has been submitted by:

  1. @pentatonictritones

@0xtuytuy please take a look at the submitted work:


0xtuytuy commented 2 years ago

Work was submitted and approved here: https://github.com/GetAlluo/alluo-protocol/pull/22

Closing this issue, to avoid confusion