DefiLlama / yield-server

140 stars 792 forks source link

ReHold APYs Issue #818

Closed bifot closed 1 year ago

bifot commented 1 year ago

On 24th May ReHold is blacklisted from yields by this commit: https://github.com/DefiLlama/yield-server/commit/32f38e1415dace9acfd5f4d7ddb2bfed58f69f9e

We're fully legit project with support from tier 1 projects such as Polygon, Chainstack, etc.

Also, we've been audited by PeckShield: https://github.com/peckshield/publications/blob/master/audit_reports/PeckShield-Audit-Report-ReHold-v1.0.pdf

All of our APYs are real, it can be easily checked via https://app.rehold.io, we don't have any restrictions for any users or staking period (duals can be easily extended with manual replay or gas-free auto-replay).

Currently, we're supporting 5 blockchains (BNB Chain, Arbitrum, Polygon, Avalanche, and Optimism) with 37+ tokens, and APR up to 220%. All of these values are taken from the smart contracts (which have been audited as I mentioned before).

Here's an example of how to check the yield (and calculate it to APY via smart contract on BNB Chain)

  1. Navigate to https://bscscan.com/address/0x3185b7c3a4e646fb23c6c04d979e61da7871b5c1#readContract
  2. Get random tariff from the list, just for example [251,0xAD29AbB318791D579433D831ed122aFeAf29dcfe,0x55d398326f99059fF775485246999027B3197955,24,602740,true]
  3. 0xAD29AbB318791D579433D831ed122aFeAf29dcfe is FTM BEP20 and 0x55d398326f99059fF775485246999027B3197955 is USDT BEP20
  4. 24 is the staking period in hours and 602740 is a yield for the current staking period (multiplied by 1e8), so that's the math: 602740 / 1e8 * 365 = 2.2 = 220% for FTM/USDT on BNB Chain
image

Hope it answers all of your questions about our real APYs and I will wait for any updates or possible concerns, will be happy to answer!

Thank you!

bifot commented 1 year ago

Also, we have a comment that the APY is for 12/24 hours and can be extended easily after replaying the position. Here's the very first pull request to this repo with our adapter: https://github.com/DefiLlama/yield-server/pull/599

bifot commented 1 year ago

Hi @0xngmi @slasher125, could you take a look please?

slasher125 commented 1 year ago

hi, we have removed it cause:

So, for the yield adapter to be listed again I suggest to reimplement it by using the earned fee in the last 24h, and scale that up.

bifot commented 1 year ago
  1. It's true, we have fixed APYs to simplify the process of investing but we have an algorithm for adjusting APYs depending on the market conditions. It is made to reduce gas costs (we don't need to change APY to 201%, 202%, 199%, etc.). We change APYs when it's required more than 10-20%, you can check the next articles in our blog:

https://rehold.io/blog/rehold-apr-adaptation-key-risk-management-mechanism https://rehold.io/blog/12-hour-duals-apr-220 https://rehold.io/blog/rehold-adapts-apr-to-market-conditions

The protocol business model is that the protocol should receive more earnings from the CLMM (such as Uniswap or others) than the payout to the user. Here's the quote from our Whitepaper:

If the earnings from providing liquidity are greater than the Dual Investment yield to a user, then the rest is a profit for the protocol. If not, the protocol will use its own liquidity to pay a user’s yield. The protocol has a mechanism for managing staking plans in different market conditions to avoid frequent losses, it will disable a pair of tokens or update the APR то suitable.

https://rehold.io/whitepaper.pdf

2/3. It is. Let's imagine that you invest 1,000 USDT into ETH/USDT pool when the price of ETH is 1000. You'll receive 150% APR after the 24h staking, so you have two possible outputs depending on the close price: 1000 * (1+1.5/365) = 1004.10959 USDT or 1000 / 1000 * (1+1.5/365) = 1.00410959 ETH. So, in this case, 4.10959 USDT or 0.00410959 ETH is the fee (or yield for the user after the staking period).

There are formulas from Whitepaper:

image

Here's how the math works, sometimes it is possible to get an IL, if the close price is much less than the entry price, you may receive crypto with revaluation in USD (like if some token price will go to zero, you'll receive this token + yield in this token, but in USD it will be almost zero), that's why we recommend selecting the fundamental tokens.

We've detailed explanation about the risk scenarios in our docs and it can be found here: https://docs.rehold.io/duals/dual-investment#risk-scenarios

Also, this math is written by smart contracts on-chain and we're using Chainlink oracles for maximum transparency and the user will always receive the exact tokens as it is seen on the UI of the app.

Here's the yield calculation and the output amount (with the yield) as I explained before: https://bscscan.com/address/0x3185b7c3a4e646fb23c6c04d979e61da7871b5c1#contracts

image

Thank you!

bifot commented 1 year ago

About the possibility of APYs: here's the example of ETH/USDT on Uniswap V3 (via https://uniswap.fish/) with the price range from -1% from the current price to +1% from the current price and the APY is 654% when ReHold's is 150%. So, the protocol will add liquidity in this price range or extend it to reduce the risks of IL (but the APY will be less). However, the user will receive a fixed APY, and the protocol will get the profit or loss from the rest (PnL = Total Earnings - User Earnings).

image
bifot commented 1 year ago

Hi @0xngmi @slasher125, if you have any questions I'm ready to answer

bifot commented 1 year ago

Hi @0xngmi @slasher125, could you check it please?

slasher125 commented 1 year ago

no need for constant pinging. i'll get back to u

bifot commented 1 year ago

Hi @slasher125, do you have any more questions? Hope to resolve this issue

slasher125 commented 1 year ago

so, we decided against relisting cause the fixed aprs are not reflecting actual performance values, which is just confusing from a users perspective on our page.

closing this

bifot commented 1 year ago

OK, I'll let you know about the ReHold V2 (which will have the dynamic APYs, so I will open a new issue soon). Thanks anyway!