Skip to content

Commit 4b225ce

Browse files
committed
Add function that calculate liquid supply
1 parent 64dad86 commit 4b225ce

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contracts/dao/extensions/aibtc-token.clar

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,8 @@
113113
(try! (ft-mint? SYMBOL (/ (* MAXSUPPLY u20) u100) .aibtc-token-dex)) ;; <%= it.token_symbol %> <%= it.dex_contract %>
114114
;; mint tokens to the treasury (80%)
115115
(try! (ft-mint? SYMBOL (/ (* MAXSUPPLY u80) u100) .aibtc-treasury)) ;; <%= it.token_symbol %> <%= it.treasury_contract %>
116+
)
117+
;; Total supply - tokens in treasury - tokens in dex
118+
(define-read-only (get-liquid-supply)
119+
(- (ft-get-supply SYMBOL) (ft-get-balance SYMBOL .aibtc-treasury) (ft-get-balance SYMBOL .aibtc-token-dex))
116120
)

0 commit comments

Comments
 (0)