Hi there,
Thank you for the detailed explanation and reproducible case. It made is easy to track down the issue. You discovered an issue in the API. We will get this issue fixed and I will let you know once it is fixed.
So the problem you are running into is this. You are setting the renderer on the server side for an ImageryLayer via its raster functions. We are not converting the statistics object to the server side statistics properly. The renderer will work as expected if you change your statistics definition from:
statistics: [{
min: 500,
max: 3000
}],
To:
statistics: [[500,3000, 1000, 505]]
Hope this helps and thanks for bringing this issue to our attention.
-Undral