# Mechanisms

<details>

<summary><strong>Pricing Function</strong></summary>

Goldiswap determines the market price of each LOCKS token according to the following function:

&#x20;                   $$Market Price = Floor Price +(PSL /  TotalSupply)\*((FSL + PSL) / FSL)^6$$

This price function ensures that LOCKS tokens never trade below the floor price, while also allowing for the price to represent market sentiment in a natural and controlled manner that enables price discovery and mimics the price behaviour of traditional AMM’s. In essence, the function ensures that the volatility of the market price increases exponentially as the PSL/FSL ratio increases. When the PSL/FSL ratio reaches 0.5, Goldiswap redirects all HONEY from buys towards the FSL until the ratio falls back below 0.5.

Note that the AMM imposes a 5% tax on all sales of LOCKS. 100% of this tax is sent back to the PSL.

</details>

<details>

<summary><strong>Raising the Floor</strong></summary>

Goldiswap incorporates an automated floor-raising mechanism that increases the floor price of LOCKS by moving a portion of the PSL to the FSL whenever certain conditions are met.

Specifically, Goldiswap contains a \`target ratio’ variable T such that when the ratio PSL/FSL hits T, Goldiswap transfers a portion of the PSL to the FSL, thereby increasing the floor price permanently. The portion of the PSL that is transferred to the FSL on floor raise increases as a function of the PSL/FSL ratio -- it is very small when market price is close to floor and increases as the market price goes further above the floor.

After the floor is raised this way, the PSL/FSL ratio will decrease back below T and a new target threshold is set at 1.02\*T. If the PSL/FSL ratio is stuck below T for a period of time, the protocol will gradually decrease T so that it becomes easier to reach it, thereby ensuring that the floor never stops rising. Specifically, Goldiswap decreases T by n% each day, where n is the number of days since the last time it hit T.

</details>

<details>

<summary><strong>Trading Fees</strong></summary>

Goldilocks DAO takes a standard fee of 0.3% on all buys through Goldiswap, this fee is sent to the DAO treasury.

</details>
