Skip to content

Commit d43ccb9

Browse files
add ricardian contracts for wevotethefee
1 parent b06605a commit d43ccb9

2 files changed

Lines changed: 102 additions & 0 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<h1 class="clause">UserAgreement</h1>
2+
3+
The contract wevotethefee is designed to govern the fee values of those pair tokens from the contract evolutiondex that have wevotethefee as their fee_contract.
4+
Users in possession of such pair tokens can vote for one of the following values:
5+
1,2,3,5,7,10,15,20,30,50,75,100,150,200,300. One unit of fee value is equal to 0.01%.
6+
The contract wevotethefee will change the fee value of a valid pair token when the action updatefee is applied by anyone. The new fee will be equal to the weighted median of the votes. The weight of each vote is the corresponding balance of the pair token. Note: evolutiondex notifies the fee_contract each time a user's pair token balance is modified.
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<h1 class="contract">openfeetable</h1>
2+
3+
---
4+
spec_version: "0.2.0"
5+
title: Open fee table
6+
summary: 'Open a fee table for a given pair token'
7+
---
8+
9+
{{user}} initializes a table for registering votes for the pair token
10+
{{pair_token}} of the contract evolutiondex.
11+
12+
The authorization of {{user}} is required, who will pay for the RAM required.
13+
14+
15+
<h1 class="contract">closefeetable</h1>
16+
17+
---
18+
spec_version: "0.2.0"
19+
title: Close fee table
20+
summary: 'Close a fee table for a given pair token'
21+
---
22+
23+
This action closes the fee table corresponding to {{pair_token}}. It will fail if the table is storing at least one vote.
24+
In case it succeeds, the corresponding RAM will be liberated.
25+
26+
27+
<h1 class="contract">votefee</h1>
28+
29+
---
30+
spec_version: "0.2.0"
31+
title: Vote fee
32+
summary: 'Vote fee value for a specific pair token'
33+
---
34+
35+
{{user}} votes a fee value for {{pair_token}} of evolutiondex.
36+
The exact value voted will be equal to the least of the numbers
37+
1,2,3,5,7,10,15,20,30,50,75,100,150,200,300 that is greater than or equal to {{fee_voted}}. One unit of fee value is equal to 0.01%.
38+
39+
The authorization of {{user}} is required, who will pay for the RAM required.
40+
41+
<h1 class="contract">closevote</h1>
42+
43+
---
44+
spec_version: "0.2.0"
45+
title: Close vote
46+
summary: 'Close vote for a specific pair token'
47+
---
48+
49+
{{user}} closes its vote corresponding to {{pair_token}} of evolutiondex.
50+
The corresponding RAM will be liberated.
51+
52+
The authorization of {{user}} is required.
53+
54+
55+
<h1 class="contract">updatefee</h1>
56+
57+
---
58+
spec_version: "0.2.0"
59+
title: Update fee
60+
summary: 'Updates the fee value of a specific pair token'
61+
---
62+
63+
This actions executes the action changefee from evolutiondex with inputs {{pair_token}} and a fee value that is computed as the weighted median of the current votes in the corresponding fee table.
64+
The weights of the votes are the balances of the pair token of each voter.
65+
66+
67+
<h1 class="contract">onaddliquidity</h1>
68+
69+
---
70+
spec_version: "0.2.0"
71+
title: On add liquidity
72+
summary: 'Updates the weight of a vote when adding liquidity'
73+
---
74+
75+
When evolutiondex notifies that {{user}} has added liquidity to the pair token {{asset_to_symbol_code to_buy}}, the weight of the vote of {{user}} is updated accordingly.
76+
77+
<h1 class="contract">onremliquidity</h1>
78+
79+
---
80+
spec_version: "0.2.0"
81+
title: On remove liquidity
82+
summary: 'Updates the weight of a vote when removing liquidity'
83+
---
84+
85+
When evolutiondex notifies that {{user}} has removed liquidity from the pair token {{asset_to_symbol_code to_sell}}, the weight of the vote of {{user}} is updated accordingly.
86+
87+
88+
<h1 class="contract">ontransfer</h1>
89+
90+
---
91+
spec_version: "0.2.0"
92+
title: On transfer
93+
summary: 'Updates the weight of a vote on a transfer by the contract evolutiondex'
94+
---
95+
96+
When evolutiondex notifies that {{from}} has transferred {{quantity}} to {{to}}, the weights of the votes of {{from}} and {{to}} are updated accordingly.

0 commit comments

Comments
 (0)