Skip to content

Commit

Permalink
Merge pull request #28 from ReflectiveChimp/fix/collect-full-underlyi…
Browse files Browse the repository at this point in the history
…ng-balance

store totalUnderlyingAmount0/1 for ClmManagerCollectionEvent instead …
  • Loading branch information
seguido authored Sep 13, 2024
2 parents cf9ec7f + d921814 commit c09f5d4
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bin/delete-all.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion bin/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# config
valid_chains=($(ls config | sed 's/\.json//g'))
Expand Down
2 changes: 1 addition & 1 deletion bin/prepare.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

CHAIN=$1
valid_chains=($(ls config | sed 's/\.json//g'))
Expand Down
2 changes: 1 addition & 1 deletion bin/release.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion bin/tag-all.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
2 changes: 1 addition & 1 deletion bin/untag-all.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
4 changes: 4 additions & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,10 @@ type ClmManagerCollectionEvent @entity(immutable: true) {
underlyingAltAmount0: BigInt!
"Amount of underlying tokens in the CLM assigned to the alt position in the second token."
underlyingAltAmount1: BigInt!
"Underlying balance of the first token after event"
underlyingAmount0: BigInt!
"Underlying balance of the first token after event"
underlyingAmount1: BigInt!

"Amount of collected fees in the first token"
collectedAmount0: BigInt!
Expand Down
2 changes: 2 additions & 0 deletions src/clm/compound.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ function handleClmStrategyFees(
collect.underlyingMainAmount1 = clmData.token1PositionMainBalance
collect.underlyingAltAmount0 = clmData.token0PositionAltBalance
collect.underlyingAltAmount1 = clmData.token1PositionAltBalance
collect.underlyingAmount0 = clmData.totalUnderlyingAmount0
collect.underlyingAmount1 = clmData.totalUnderlyingAmount1
collect.collectedAmount0 = collectedAmount0
collect.collectedAmount1 = collectedAmount1
collect.collectedOutputAmounts = collectedOutputAmounts
Expand Down

0 comments on commit c09f5d4

Please sign in to comment.