Giter Site home page Giter Site logo

ada-delegation's Introduction

ada-delegation's People

Contributors

eddex avatar longngn avatar nevdatadyne avatar shadowkora avatar

Watchers

 avatar  avatar  avatar

Forkers

eddex nevdatadyne

ada-delegation's Issues

Bug in pool filter script: Only 0% pools are selected as eligible for Minswap delegation

There is a bug in the get_eligible_pool_list.py script.

The requirements for a pool to be eligible as as follows:

  • Single-pool operators only
  • Pool size: 200k-5m ADA at time of snapshot
  • Fixed cost: 340 ADA
  • Minimum Pledge: 20k
  • Must be registered for at least 6 months
  • Total Variable Fee/Margin to never exceed 3%
  • Pool Operator has demonstrated technical capabilities: having minted at least 1 block

(as defined here: https://forum.minswap.org/t/minswap-ada-delegation-framework/3808)

The function to determine if a pool is eligible takes all these things into account:

    if 200_000_000_000 < stake < 5_000_000_000_000 and \
       tax_fix == 340_000_000 and \
       pledge > 20_000_000_000 and \
       tax_ratio <= 0.03 and \
       blocks_lifetime >= 1:
        return False

https://github.com/minswap/ada-delegation/blob/9de24a7e3391c31fabda46a863607cab98a7862e/get_eligible_pool_list.py#L18C8-L18C31

The bug is on line 18. The check for the pool margin fee (aka. tax_ratio in the json file) is checked against 0.03. This should be 3%.
However, the tax_ratio in the data is the percentage, not the percentile.

Example: A pool with a 1.5% margin fee would have a tax_ratio of 1.5, not 0.015.

This leads to only pools with a <0.03% margin fee to be eligible.

I think this is a pretty severe bug and the randomly selected pools should be re-rolled after the fix.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.