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 (...
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 ...
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
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 ...
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:
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.
...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
curve × 16solidity × 8
defi × 3
go-ethereum × 2
math × 2
voting × 2
amm × 2
pairings × 2
escrow × 2
foundry × 2
gas × 1
uniswap × 1
brownie × 1
cryptography × 1
liquidity-provider × 1
verify × 1
vyper × 1
swaps × 1
staking × 1
safemath × 1
eth-call × 1
elliptic × 1
bonding-curves × 1
code × 1
uniswapv3 × 1