Skip to content

Commit

Permalink
feat: filter out latest unprofitable pending deposits (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
amateima authored Nov 29, 2022
1 parent 49be6fe commit 7cd7a37
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/deposit/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export class DepositService {
.createQueryBuilder("d")
.where("d.status = :status", { status })
.andWhere("d.depositDate > NOW() - INTERVAL '1 days'")
.andWhere("d.depositRelayerFeePct / power(10, 18) >= 0.0001")
.orderBy("d.depositDate", "DESC")
.take(limit)
.skip(offset)
Expand Down Expand Up @@ -95,5 +96,6 @@ export function formatDeposit(deposit: Deposit) {
amount: deposit.amount,
depositTxHash: deposit.depositTxHash,
fillTxs: deposit.fillTxs.map(({ hash }) => hash),
depositRelayerFeePct: deposit.depositRelayerFeePct,
};
}

0 comments on commit 7cd7a37

Please sign in to comment.