Skip to content

Module Development Task: Volume Restriction (Dumping) #268

Closed

Description

@CPSTL

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

  1. Module specs are fulfilled
  2. Module is implemented using appropriate module interface
  3. Module is tested with >95% branch coverage
  4. Module is delivered before deadline
  5. Module does not present any bugs.
  6. 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

Activity

  1. gitcoinbot commented on Sep 21, 2018

    @gitcoinbot

    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.

  2. gitcoinbot commented on Sep 22, 2018

    @gitcoinbot

    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.

  3. satyamakgec commented on Sep 22, 2018

    @satyamakgec
    Contributor

    @samparsky Sounds awesome! Best of luck

  4. gitcoinbot commented on Sep 25, 2018

    @gitcoinbot

    @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!

    • warning (3 days)
    • escalation to mods (6 days)

    Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

  5. samparsky commented on Sep 25, 2018

    @samparsky

    @satyamakgec I have started work on this.
    Created VolumeRestrictionManager.sol & VolumeRestrictionManagerFactory.sol in the TM folder, also using the TM architecture

  6. satyamakgec commented on Sep 25, 2018

    @satyamakgec
    Contributor

    @samparsky Awesome! whenever your code is ready please create a PR (WIP) to review

  7. samparsky commented on Sep 27, 2018

    @samparsky

    @satyamakgec For modifying/editing the VolumeRestriction.sol are all the attributes i.e. % of tokens, start date, end date, rolling period modifiable?

  8. satyamakgec commented on Sep 30, 2018

    @satyamakgec
    Contributor
  9. gitcoinbot commented on Oct 1, 2018

    @gitcoinbot

    @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!

    • warning (3 days)
    • escalation to mods (6 days)

    Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

  10. gitcoinbot commented on Oct 3, 2018

    @gitcoinbot

    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:

    1. @samparsky

    @CPSTL please take a look at the submitted work:


  11. rmshea commented on Oct 15, 2018

    @rmshea

    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. :)

  12. CPSTL commented on Oct 15, 2018

    @CPSTL
    ContributorAuthor

    Hey @ryan-shea @samparsky! We are still reviewing it :)

  13. gitcoinbot commented on Nov 12, 2018

    @gitcoinbot

    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.

  14. gitcoinbot commented on Nov 12, 2018

    @gitcoinbot

    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.

  15. satyamakgec commented on Jan 8, 2019

    @satyamakgec
    Contributor

    closing in the favor of #421

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Module developmentUsed when new module is createdopen-source communitySomething suggest or developed by external developers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions