-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add market parameter TobinTaxList to speicify a more strict tobin tax…
… for the denom with high volatility
- Loading branch information
Yun
committed
Dec 3, 2019
1 parent
9b5718d
commit ffd1d8c
Showing
10 changed files
with
127 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package types | ||
|
||
import ( | ||
"fmt" | ||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
) | ||
|
||
// TobinTax - struct to store tobin tax for the specific denom with high volatility | ||
type TobinTax struct { | ||
Denom string `json:"denom" yaml:"denom"` | ||
TaxRate sdk.Dec `json:"tax_rate" yaml:"tax_rate"` | ||
} | ||
|
||
// String implements fmt.Stringer interface | ||
func (tt TobinTax) String() string { | ||
return fmt.Sprintf(`TobinTax | ||
Denom: %s, | ||
TaxRate: %s`, | ||
tt.Denom, tt.TaxRate) | ||
} | ||
|
||
// TobinTaxList is convience wrapper to handle TobinTax array | ||
type TobinTaxList []TobinTax | ||
|
||
// String implements fmt.Stringer interface | ||
func (ttl TobinTaxList) String() (out string) { | ||
out = "" | ||
for _, tt := range ttl { | ||
out += tt.String() + "\n" | ||
} | ||
|
||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters