Comments (3)
@maraoz is this still valid considering what is planned for the zOS scheduler?
from openzeppelin-contracts.
What's perhaps best here is an easy "asyncSend" implementation that follows the "vesting pattern" from vesting contracts; allow users to withdraw tokens at an easily configured schedule.
So for "every week" the function would look something like
function withdraw() external {
var hasWithdrawn = withdrawnAmounts[msg.sender];
// send msg.sender `availableAt(now) - hasWithdrawn` ether
}
function availableAt(uint256 timestamp) internal pure {
// very pseudo code
return (timestamp - startTime) / (1 week) * rate;
}
from openzeppelin-contracts.
Such a feature would be easily implemented via ConditionalEscrow
s, where only amounts smaller than the currently vested value can be withdrawn. Regarding having someone else execute the transactions, metatransactions are probably the way forward.
Closing to reduce issue clutter.
from openzeppelin-contracts.
Related Issues (20)
- Add a MerkleProof.verify function that support arbitrary internal hashes
- Use transient storage in ReentrancyGuard
- Incorrect "deadline" field description in IERC20Permit HOT 4
- Remove pseudo-fuzzing tests in hardhat in favor of foundry fuzzing. HOT 3
- ERC2771Forwarder has a flaky tampered signature test
- Security considerations regarding `SignatureChecker.isValidERC1271SignatureNow` HOT 2
- Consider adding block.chainid in ERC2771Forwarder transactions HOT 2
- Online tools support custom Solidity versions HOT 1
- Add paginated lookups for EnumerableSet and EnumerableMap HOT 2
- WebAuthn implementation
- Implement a CircularBuffer
- [Vanta] Remediate "Low vulnerabilities identified in packages are addressed (Github Repo)" for npm-undici/CVE-2024-24758 HOT 1
- Online tools support custom Solidity versions HOT 1
- Use EIP-1967 for Ownable storage HOT 5
- Ownable2Step doesn't call Ownable constructor HOT 1
- Mining Apps for quickest rise dividend
- Potentially redundant getVotes in Governor propose function HOT 1
- The natspec comment of IAccessControl regarding `RoleGranted` event should be updated HOT 1
- Improve gas efficiency of `SafeERC20.forceApprove` when the token returns a bool on approve
- Merge 4.9.6 and 5.0.2 changelog entry into master HOT 1
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 openzeppelin-contracts.