mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-03 13:53:10 +00:00
11 lines
332 B
JavaScript
11 lines
332 B
JavaScript
function collateralPerSlot(request) {
|
|
return request.ask.collateralPerByte * request.ask.slotSize
|
|
}
|
|
|
|
function repairReward(configuration, collateral) {
|
|
const percentage = configuration.collateral.repairRewardPercentage
|
|
return Math.round((collateral * percentage) / 100)
|
|
}
|
|
|
|
module.exports = { collateralPerSlot, repairReward }
|