Skip to main content
4 votes

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

While EIP-2537 (featuring BLS12-381) has not been approved nor finalized yet, you can run a private network supporting that precompile. In addition to that, there's a nice GitHub Solidity library (...
Mila A's user avatar
  • 1,554
3 votes
Accepted

How to express a negative power in Solidity?

To implement a decay formula: you should use int256 as signed integers for using negative exponent powers You can use exponents as hardcoded values if you're using ** which denotes exponents so you ...
Shahroz Khan's user avatar
3 votes

Curve Voting Escrow Explanations

Just an update to Liron's answer, the whitepaper is now moved to https://github.com/curvefi/curve-dao-contracts/blob/master/doc/README.md
0xbe1's user avatar
  • 31
2 votes
Accepted

Curve AMM - How is fee calculated when adding liquidity?

Posting answer from Twitter Simple derivation for the multiplier. We want 2 things: Zero fee when all assets are added/removed in proportion to their balances (maintain same price) Adding/removing ...
tsknakamura's user avatar
1 vote
Accepted

Curve Voting Escrow Explanations

The Curve DAO whitepaper was very helpful for me for understanding the code, I really recommend starting with it: https://curve.fi/files/CurveDAO.pdf Specifically this part:
Liron Achdut's user avatar
1 vote

EvmError: Revert Foundry

gabr1sr helped with the fix. Use vm.createSelectFork() in setUp function of test files to create and select the fork in the same statement. Use the [rpc_endpoints] of oundry.toml to store rpc URLs. ...
Saikat Karmakar's user avatar
1 vote
Accepted

add liquidity to a curve pool

Looking at the code the call fails here: # Invariant after change D1: uint256 = self.get_D_mem(rates, new_balances, amp) assert D1 > D0 // this assert fails! Are you planning to provide liquidity ...
Markus Schick's user avatar
1 vote
Accepted

What happens on curves VotingEscrow contract after 5 years?

Each time _checkpoint() is called (for example during deposits or withdrawals), the 255-week period is reset. For the vote weight to get broken, 255 weeks have to go by without anyone interacting with ...
Federico Nanni's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible