You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Module Development Task: Volume Restriction (Dumping) #268
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;
}
The following are steps that will be taken to complete this task:
To start off I would go through the existing code
Then I would add the volume restriction code and then test it.
Write programmatic tests to cover 100% of the contract's functionality
Check contract for known Solidity bugs/issues/exploits
Use Consensys' Mythril tool as a final sanity check
@samparsky Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
@satyamakgec I have started work on this.
Created VolumeRestrictionManager.sol & VolumeRestrictionManagerFactory.sol in the TM folder, also using the TM architecture
@samparsky Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Hey @CPSTL, Ryan from Gitcoin, checking in here. Looks like @samparsky submitted a PR last week. Have you had a chance to take a look at it? Let me know if you have any questions. :)
Activity
gitcoinbot commentedon Sep 21, 2018
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
This issue now has a funding of 10000.0 POLY (1499.0 USD @ $0.15/POLY) attached to it.
gitcoinbot commentedon Sep 22, 2018
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work has been started.
These users each claimed they can complete the work by 4 months, 2 weeks ago.
Please review their action plans below:
1) samparsky has been approved to start work.
The following are steps that will be taken to complete this task:
To start off I would go through the existing code
Then I would add the volume restriction code and then test it.
Write programmatic tests to cover 100% of the contract's functionality
Check contract for known Solidity bugs/issues/exploits
Use Consensys' Mythril tool as a final sanity check
Learn more on the Gitcoin Issue Details page.
satyamakgec commentedon Sep 22, 2018
@samparsky Sounds awesome! Best of luck
gitcoinbot commentedon Sep 25, 2018
@samparsky Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
samparsky commentedon Sep 25, 2018
@satyamakgec I have started work on this.
Created
VolumeRestrictionManager.sol&VolumeRestrictionManagerFactory.solin the TM folder, also using the TM architecturesatyamakgec commentedon Sep 25, 2018
@samparsky Awesome! whenever your code is ready please create a PR (WIP) to review
samparsky commentedon Sep 27, 2018
@satyamakgec For modifying/editing the VolumeRestriction.sol are all the attributes i.e. % of tokens, start date, end date, rolling period modifiable?
satyamakgec commentedon Sep 30, 2018
@samparsky Yes
gitcoinbot commentedon Oct 1, 2018
@samparsky Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!
Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days
gitcoinbot commentedon Oct 3, 2018
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work for 10000.0 POLY (1740.0 USD @ $0.17/POLY) has been submitted by:
@CPSTL please take a look at the submitted work:
rmshea commentedon Oct 15, 2018
Hey @CPSTL, Ryan from Gitcoin, checking in here. Looks like @samparsky submitted a PR last week. Have you had a chance to take a look at it? Let me know if you have any questions. :)
CPSTL commentedon Oct 15, 2018
Hey @ryan-shea @samparsky! We are still reviewing it :)
gitcoinbot commentedon Nov 12, 2018
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
The funding of 10000.0 POLY (1740.0 USD @ $0.17/POLY) attached to this issue has been approved & issued to @samparsky.
gitcoinbot commentedon Nov 12, 2018
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
The funding of 10000.0 POLY (1740.0 USD @ $0.17/POLY) attached to this issue has been approved & issued to @samparsky.
satyamakgec commentedon Jan 8, 2019
closing in the favor of #421