dagger-contracts/test/price.js

10 lines
249 B
JavaScript

function maxPrice(request) {
return request.ask.slots * request.ask.duration * request.ask.reward
}
function payoutForDuration(request, start, end) {
return (end - start) * request.ask.reward
}
module.exports = { maxPrice, payoutForDuration }