Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
(define-constant ERR_CLAIM_FAILED u950002)
(define-constant ERR_INVALID_REWARD_TOKEN u950003)
(define-constant ERR_INSUFFICIENT_USDA u950004)
(define-constant ERR_POOL_BALANCE_TOO_LOW u950005)

(define-constant MIN_POOL_USDA u10000000000)

;; ---------------------------------------------------------
;; Variables
Expand Down Expand Up @@ -397,6 +400,7 @@
(new-usda-balance (- usda-balance amount))
(new-fragments-per-token (/ (var-get fragments-total) new-usda-balance))
)
(asserts! (>= new-usda-balance MIN_POOL_USDA) (err ERR_POOL_BALANCE_TOO_LOW))
(var-set fragments-per-token new-fragments-per-token)

(try! (as-contract (contract-call? .arkadiko-dao burn-token .usda-token amount tx-sender)))
Expand Down
Loading
Loading