Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xGov-80 is inviting comments on their deliverables #211

Closed
nonfungibleab opened this issue May 6, 2024 · 7 comments
Closed

xGov-80 is inviting comments on their deliverables #211

nonfungibleab opened this issue May 6, 2024 · 7 comments

Comments

@nonfungibleab
Copy link
Contributor

#80 (comment)

@GhostOfMcAfee
Copy link

Milestone 2 does not seem to have been met. There is no clAMM functionality according to Biatec's own website.

image

Moreover, there does not even seem to be basic DEX functionality. I cannot create new pairs and I cannot even add LP.

No payment should be made.

@simonbelingar
Copy link

simonbelingar commented May 15, 2024

I for one would rather see someone is trying to make clamm work than just looking to shut it down - so hopefully AF dev team can provide their feedback and ideally the stuff is all there and we can all benefit from it....

That being said if you vote for a proposal that doesnt outline how you'll be abel to verify it(or the method provided is out of your skill-set) that's on you (xgovs not being too experts topic again).

Personally i have no clue about the technicals behind clamm it and don't really have time to dig into it - i say let the people who voted for it do their checking, if they don't have skills to check (e.g. testing that it works as expected from end user side, or no technical skills to check SC - then why did people vote for it, knowing they wont eb able to verify or use it, is beyond me).

@GhostOfMcAfee
Copy link

I would like to see clAMM work. But payment has been requested for product that does not appear to have been delivered. The decision at this point is pay vs not pay.

@knonode
Copy link

knonode commented May 15, 2024

The proposal:
"We will build Open source concentrated liqudity AMM integrated to at least one of the Algorand's DEX aggregotors."
The reality:
A mock-up of a DEX that is unusable, website takes up most of CPU on a personal computer. None of the trading assets are marked with ASA ID, which does not make it a safe product, even if it worked.
And, yes, no clAmm delivered.

Please end this charade.

@joe-p
Copy link

joe-p commented May 15, 2024

I want to point out that this is the contents of milestone 2

Milestone 2 - Smart contract delivery

Date: T + 3 months
Amount: 200000 ALGO

The contract is here: https://github.com/scholtz/BiatecCLAMM/

UPDATE: See @scholtz comment below for why this test run failed. I have confirmed all tests are now passing for me. This is not a bug in the contracts, but just an edge case for test environment.

The repo also contains tests, I got 24/25 are passing locally (after removing @abi.readonly due to bug in algosdk). I do not know enough about CLAMMs nor have I spent a significant amount of time with this code to fully understand the tests and why one might be failing. Perhaps @scholtz can elaborate.

  clamm
    ✓ I can deploy the concentrated liqudity pool (1105 ms)
    ✓ calculatePrice returns correct results (2157 ms)
    ✓ calculateAssetBWithdrawOnAssetADeposit returns correct results (1959 ms)
    ✓ calculateAssetAWithdrawOnAssetBDeposit returns correct results (3673 ms)
    ✓ calculateLiquidity returns correct results (3436 ms)
    ✓ calculateAssetAWithdrawOnLPDeposit returns correct results (1415 ms)
    ✓ calculateAssetBWithdrawOnLPDeposit returns correct results (1335 ms)
    ✓ calculateAssetBDepositOnAssetADeposit returns correct results (1403 ms)
    ✓ calculateAssetADepositOnAssetBDeposit returns correct results (1337 ms)
    ✓ addLiquidity1 - I can add liquidity to the pool (2920 ms)
    ✓ addLiquidity2 - I can add liquidity to the pool second step (1355 ms)
    ✓ swapAtoB - I can add liquidity to the pool and swap from A token to B token (1380 ms)
    ✓ swapBtoA - I can add liquidity to the pool and swap from B token to A token (1151 ms)
    ✓ removeLiquidity - I can add and remove liquidity from the pool (3083 ms)
    ✓ LP fees 10%, Biatec fee - 0% - I can add, swap and remove liquidity from the pool (1327 ms)
    ✓ LP fees 10%, Biatec fee - 50% - I can add, swap and remove liquidity from the pool (1379 ms)
    ✓ ASASR - LP fees 10%, Biatec fee - 0% - I can add, swap, add, swap, and remove all liquidity from the pool (1904 ms)
    ✓ I can have algo vs asa in the pool (1524 ms)
    ✓ I can withdraw lp fees from biatec account (1605 ms)
    ✓ If someone deposits the asset a or asset b to the pool, we can distribute these assets to lp holders (2352 ms)
    ✓ I can make the pool protect algorand network (1297 ms)
    ✕ Extreme-SamePriceLowTop - ASASR - I can handle the trade as an order book item (1840 ms)
    ✓ Extreme-SmallMinMaxPriceDiff - ASASR 0.9999 - 1.0001, LP fee 1BPS, Biatec fee 10% (1851 ms)
    ✓ Extreme-ExtremePrice-Min - ASASR 0.000000001 - 1, LP fee 1BPS, Biatec fee 10% (3028 ms)
    ✓ Extreme-No-Fees - ASASR EURUSD - 0.9 - 1.1, LP fee 0, Biatec fee 0% (1615 ms)

  ● clamm › Extreme-SamePriceLowTop - ASASR - I can handle the trade as an order book item

    expect(received).toStrictEqual(expected) // deep equality

    - Expected  - 8
    + Received  + 8

    @@ -15,22 +15,22 @@
        "period1PrevTime": 1715792284n,
        "period1PrevVWAP": 4000000000n,
        "period1PrevVolumeA": 909090910n,
        "period1PrevVolumeB": 3200000000n,
        "period2Duration": 3600n,
    -   "period2NowFeeA": 90909090n,
    +   "period2NowFeeA": 0n,
        "period2NowFeeB": 725490196n,
        "period2NowTime": 1715792400n,
        "period2NowVWAP": 4000000000n,
    -   "period2NowVolumeA": 2909090910n,
    -   "period2NowVolumeB": 12474509804n,
    -   "period2PrevFeeA": 0n,
    +   "period2NowVolumeA": 2000000000n,
    +   "period2NowVolumeB": 9274509804n,
    +   "period2PrevFeeA": 90909090n,
        "period2PrevFeeB": 0n,
    -   "period2PrevTime": 0n,
    -   "period2PrevVWAP": 0n,
    -   "period2PrevVolumeA": 0n,
    -   "period2PrevVolumeB": 0n,
    +   "period2PrevTime": 1715792284n,
    +   "period2PrevVWAP": 4000000000n,
    +   "period2PrevVolumeA": 909090910n,
    +   "period2PrevVolumeB": 3200000000n,
        "period3Duration": 86400n,
        "period3NowFeeA": 90909090n,
        "period3NowFeeB": 725490196n,
        "period3NowTime": 1715792284n,
        "period3NowVWAP": 4000000000n,

@scholtz
Copy link
Contributor

scholtz commented May 16, 2024

I got 24/25 are passing locally

Hi, at my comp it looks like this:

image

The price feed contract which creates vwap prices sometimes does fail the tests because it depends on the time when it is run..

Looks like you have diff in the period2 which is the hour tick, and seems you just run this on the edge of passing the hour.

I will contact you on discord and check if on other pass it works for you fine.

For others the

"period2Duration": 3600n,

means that the period in there represents the hour period

-   "period2NowVolumeA": 2909090910n,
+   "period2NowVolumeA": 2000000000n,
-   "period2PrevVolumeA": 0n,
+   "period2PrevVolumeA": 909090910n,

-   "period2NowVolumeB": 12474509804n,
+   "period2NowVolumeB": 9274509804n,
-   "period2PrevVolumeB": 0n,
+   "period2PrevVolumeB": 3200000000n,

@joe-p
Copy link

joe-p commented May 16, 2024

Thanks @scholtz. I can confirm all the tests are passing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants