Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [curve]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
34 views

Fail to swap USDT to WETH in curve pool

I want to swap my USDT to WETH in curve pool: [USDT, wBTC, WETH]. // SPDX-License-Identifier: UNLICENSED pragma solidity =0.8.10; import "forge-std/Test.sol"; contract ContractTest is Test ...
LEVI_104's user avatar
2 votes
0 answers
41 views

Calling Curve smart contracts with eth_call gives unexpected results

I came across a strange response of eth_call. I made a request to Curve pool smart contract calling get_dy(int128,int128,uint256) function: curl your endpoint -X POST -H "Content-Type: ...
Nikita's user avatar
  • 21
3 votes
1 answer
110 views

How can I use BLS12-381 curve operations:EIP-2537, Whether it's on a public or private chain

Recently I have been doing an experiment to sign smart contracts with bls12-381, but I can't find any tutorial or code for this, Is there any way to do that? please tell me if you know about it.
hai zhang's user avatar
0 votes
1 answer
463 views

EvmError: Revert Foundry

Can anyone help me with a foundry test? I don't know the functions when called from the test are working but for some reason, it's not when I'm importing the contract from the src the test reverting. ...
Saikat Karmakar's user avatar
1 vote
0 answers
54 views

Get number of tokens in a curve pool

Is it possible to determine the number of tokens used in a Curve pool from a contract? Curve pools typically have a constant N_COINS in the contract, but since it's not public, it can't be read. Are ...
AGJoYy's user avatar
  • 426
1 vote
0 answers
71 views

How can we get the result of swap in curve.fi like `getAmountsOut` for uniswapV2

I'm trying to get the price for the swap WETH->DAI by calling get_dy but there is no direct pool in curve. I went to the UI & put in this swap & got this. tricypto: WETH -> USDT -> ...
Saikat Karmakar's user avatar
1 vote
0 answers
18 views

Implementing vote escrow with multiple positions and non-linear decay

I want to do vote escrow. I know that Curve is the most popular implementation. My problem with it is I want to allow multiple positions and a non-linear decay. I'd like to not write from scratch. ...
lukerogerson's user avatar
0 votes
1 answer
164 views

add liquidity to a curve pool

I am working on adding liquidity to a curve pool in Foundry in order to test the curve pool oracle in my project, however, I'm getting some difficulty in adding liquidity to a curve pool. I believe ...
Maxareo's user avatar
  • 663
1 vote
0 answers
22 views

How does Curve's economic model sustain itself despite such low trading fees?

I've been providing LP on Curve's stETH/ETH pool for some time now, but I'm finding the trading fee rewards to be somewhat disappointing. This led me to wonder about the long-term sustainability of ...
Hinoon's user avatar
  • 11
2 votes
1 answer
92 views

What happens on curves VotingEscrow contract after 5 years?

I am studying the Voting Escrow contract and im looking to incorporate it in a project im building. In the _checkpoint function , there is this for loop: t_i: uint256 = (last_checkpoint / WEEK) * ...
cutedwannabe's user avatar
0 votes
1 answer
239 views

How to express a negative power in Solidity?

Trying to express y=2^x where x is a negative number. As Solidity does not support negative powers, is there another way to express this? Thanks for any tips! We are trying to create a decay formula
Alex's user avatar
  • 3
3 votes
2 answers
531 views

Curve Voting Escrow Explanations

Curve Voting Escrow has gradually become the de facto approach for DeFi projects of gaining, decaying and consuming voting power through the functions on their smart contract. The original contract ...
Maxareo's user avatar
  • 663
1 vote
0 answers
191 views

Is there a github repo for swapping tokens on curve.fi in solidity?

I'm trying to create a contract that will programatically exchange tokens on curve.fi but since their whole app is written in vyper I have no idea how. Is there some kind of resource like a github ...
Kuly14's user avatar
  • 342
2 votes
2 answers
374 views

Curve AMM - How is fee calculated when adding liquidity?

When adding liquidity to Curve AMM, fees are calculated by the following code _fee: uint256 = self.fee * N_COINS / (4 * (N_COINS - 1)) https://github.com/curvefi/curve-contract/blob/...
tsknakamura's user avatar