Skip to content

Commit 08feacb

Browse files
author
Iztok
committed
auto transfer to cv logging
1 parent a5dae71 commit 08feacb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/fasset-bots-core/src/actors/AgentBot.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,7 @@ export class AgentBot {
678678
if (totalLots === 0) return;
679679

680680
// transfer to CV - mintedLots must be large enough
681+
logger.info(`transferToCV minted=${mintedLots} mintedOrReserved=${mintedOrReservedLots} total=${totalLots} ratio=${mintedOrReservedLots / totalLots} threshold=${this.agentBotSettings.transferToCVRatio}`);
681682
if (mintedOrReservedLots / totalLots > this.agentBotSettings.transferToCVRatio) {
682683
const openTransfers = await this.redemption.openTransferToCoreVaultIds(rootEm);
683684
if (openTransfers.length == 0) {
@@ -689,6 +690,7 @@ export class AgentBot {
689690
// actual return
690691
const transferAmount = minBN(requestedTransferAmount, maxAllowedToTransfer.maximumTransferUBA);
691692
const minTransferAmount = Math.floor(totalLots * lotSize * this.agentBotSettings.minimumTransferToCVSize);
693+
logger.info(`transferToCV req transfer=${requestedTransferAmount} max=${maxAllowedToTransfer.maximumTransferUBA} min=${minTransferAmount}`);
692694
if (transferAmount.gte(toBN(Math.max(lotSize, minTransferAmount)))) {
693695
await this.transferToCoreVault(transferAmount);
694696
}

0 commit comments

Comments
 (0)