-
Notifications
You must be signed in to change notification settings - Fork 152
Closed
Labels
Module developmentUsed when new module is createdUsed when new module is createdopen-source communitySomething suggest or developed by external developersSomething suggest or developed by external developers
Description
Module Development Task
Volume Restriction (Dumping)
| Module Type | Bounty | Completion deadline |
|---|---|---|
| Transfer Manager | Approx. 10, 000 POLY | 21 days to complete once task is confirmed by external developer(s). |
Short Summary:
This requires a way to track the number of tokens sent in a given time period. This module aims to prevent the dumping ability for security token owners by restricting trading by time period.
Note: This can be implemented as TM module with current architecture.
Bounty Requirements
- Module specs are fulfilled
- Module is implemented using appropriate module interface
- Module is tested with >95% branch coverage
- Module is delivered before deadline
- Module does not present any bugs.
- 21 days to complete module from developers initial start date.
IMPORTANT: Please work from the development-1.5.0 branch instead of master.
Module Specs and Suggested Implementation
The implementation requires keeping count of volume sent from an address in a given time period.
mapping(address => mapping(uint256 => uint256)) volumeTally;
mapping(address => mapping(uint256 => uint256)) volumeLimit;
mapping(address => uint256) limitPeriod;
// Assumes this function is only called when the transfer is successful
function verifyTransfer(address _from, address _to, uint256 _amount, bool _isTransfer) public returns(Result) {
uint256 periodId = now.div(limitPeriod[_from]);
if (_amount.add(volumeTally[_from][periodId]) > volumeLimit[_from][periodId]) {
return false;
};
volumeTally[_from][periodId] += _amount;
return true;
}
Module Details and Specs (Wireframe)
Wireframe Link: https://www.lucidchart.com/invitations/accept/8fcf7c3f-6f84-4846-8e5c-14a7df29a8cc
Metadata
Metadata
Assignees
Labels
Module developmentUsed when new module is createdUsed when new module is createdopen-source communitySomething suggest or developed by external developersSomething suggest or developed by external developers