Comments (5)
- We could add a third param as
uint256 claimAmount
, but that would make things hard for people who want to claim everything, unless we also did item 2 in this list:
This is what we do with #collect
, where the amount is a maximum to withdraw
To reduce calldata cost of specifying the max, you can treat 0
as the maximum (point 2 in your list, which is done just for calldata purposes)
You could do 3 and 2 and just call 2 from 3, to reduce calldata further (which is good for L2s)
but you can give them the same name, they will have a diff bytes4 function signature
from v3-staker.
Do we need this? I think it's a nice-to-have
but let me know if you feel strongly and we can bump it. Are there use cases where someone would only want to partially claim rewards?
from v3-staker.
Do we need this? I think it's a
nice-to-have
but let me know if you feel strongly and we can bump it. Are there use cases where someone would only want to partially claim rewards?
mainly insolvency, for whatever reason the contract has less reward token than expected (e.g. the token collects a fee on transfer)
from v3-staker.
What's the best UX here?
Right the signature is: claimReward(IERC20Minimal rewardToken, address to)
.
Some ideas (just listing them out to be exhaustive):
- We could add a third param as
uint256 claimAmount
, but that would make things hard for people who want to claim everything, unless we also did item 2 in this list: - We could make it such that if claimAmount is 0, then it claims
rewards[rewardToken][msg.sender]
, but that feels a little bit messy. - We could add another function entirely
partialClaimReward
, but that seems superfluous. - We could make it
claimReward(rewardToken, to, bool claimFullAmount, uint256 partialAmount)
Other ideas?
from v3-staker.
Ready for review: #166.
from v3-staker.
Related Issues (20)
- consider time-vesting rewards by how long the position was in range HOT 1
- After endTime, the profit will still be calculated? why is that
- Add polygon deployment addresses in readme HOT 1
- How to get the IncentiveId after the creation ? HOT 1
- How to get Reward Info ? HOT 1
- Cannot find module '../../typechain'
- yarn test error on v1.0.2 tag HOT 1
- How to deploy to hardhat network
- No way to read all staked positions of a user address, in univ3 staker contract HOT 1
- invalid arrayify value when providing bytes argument to safeTransferFrom(address,address,uint256,bytes)
- Critical Security Issue
- Return
- - - [ ] #- [ ] #_@`~~~~`_
- Implement solidity 0.8 like v3-core and v3-periphery
- Withdraw remaining incentive token when incentive end HOT 1
- blockchains/binance/assets/AERGO-46B/logo.png
- blockchains/binance/assets/AERGO-46B/logo.png HOT 1
- github.com/trustwallet/asset
- Ace100
- Add Support for Base Network in v3-Staker
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from v3-staker.