• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

gnosis / dex-services / 5103 / 3
31%
master: 31%

Build:
DEFAULT BRANCH: master
Ran 08 Sep 2020 11:11AM UTC
Files 99
Run time 12min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Sep 2020 10:59AM UTC coverage: 28.042% (+0.04%) from 28.003%
OPEN_SOLVER_VERSION=v0.0.12 PRIVATE_SOLVER_VERSION=v0.8.4

push

travis-pro

web-flow
consistent dust trade handling (#1401)

Fixes #1355

This PR adds dust amount checks for the estimated prices and orders. This was previously ignored and estimated amounts were returned for dust trades when they are not actually matchable.

### Test Plan

Added unit tests and make sure that the GUSD routes work as expected:

<details><summary>Buy amount in base is larger than dust amount</summary>

```
$ curl -s 'http://localhost:8080/api/v1/markets/6-2/estimated-buy-amount/103.19' | jq
{
  "baseTokenId": 6,
  "quoteTokenId": 2,
  "buyAmountInBase": "100",
  "sellAmountInQuote": "103.19"
}
$ curl -s 'http://localhost:8080/api/v1/markets/6-2/estimated-buy-amount/103.18' | jq
{
  "baseTokenId": 6,
  "quoteTokenId": 2,
  "buyAmountInBase": "0",
  "sellAmountInQuote": "103.18"
}
```

</details>

<details><summary>Sell amount <strong>after rounding buffer</strong> is larger than dust amount</summary>

```
$ curl -s 'http://localhost:8080/api/v1/markets/2-6/estimated-buy-amount/101' | jq   
{
  "baseTokenId": 2,
  "quoteTokenId": 6,
  "buyAmountInBase": "100.787875",
  "sellAmountInQuote": "101"
}
$ curl -s 'http://localhost:8080/api/v1/markets/2-6/estimated-buy-amount/100' | jq
{
  "baseTokenId": 2,
  "quoteTokenId": 6,
  "buyAmountInBase": "0",
  "sellAmountInQuote": "100"
}
$ curl -s 'http://localhost:8080/api/v1/markets/2-6/estimated-buy-amount/99' | jq 
{
  "baseTokenId": 2,
  "quoteTokenId": 6,
  "buyAmountInBase": "0",
  "sellAmountInQuote": "99"
}
```

</details>

12968 of 53101 branches covered (24.42%)

Branch coverage included in aggregate %.

3429 of 5371 relevant lines covered (63.84%)

44073.58 hits per line

Source Files on job 5103.3 (OPEN_SOLVER_VERSION=v0.0.12 PRIVATE_SOLVER_VERSION=v0.8.4)
  • Tree
  • List 0
  • Changed 33
  • Source Changed 1
  • Coverage Changed 33
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 1519
  • Travis Job 5103.3
  • 44f5e1df on github
  • Prev Job for OPEN_SOLVER_VERSION=v0.0.12 PRIVATE_SOLVER_VERSION=v0.8.4 on master (#5100.3)
  • Next Job for OPEN_SOLVER_VERSION=v0.0.12 PRIVATE_SOLVER_VERSION=v0.8.4 on master (#5105.3)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc