# Subscriptions

### Intro

Subscriptions contracts manage the on ramp to the platform, charging participants an amount of DAI, and letting them participate in the platform with fresh new [P+ tokens](https://helena-network.gitbook.io/trl/~/edit/drafts/-L_4V68sLVwkH7OA0ZIw/mainnet-smart-contracts/p+-token). They work as a slightly modified version of an [ERC1337](https://github.com/gitcoinco/ERC-1337),  additionally issuing an amount of tokens to subscribers. They will be deeply interconnected with the **cron** **contract**, automatically identifying if a payment was done for a month, or another, thus moving the tokens to the competition bounty pool.

The Subscription contract has the ability to issue new P+ tokens every time it receives new subscription. In order to do that, the P+ token will delegate the issuance ability to this Smart Contract.&#x20;

### Subscription Contract

The subscription contract (open to public in v2) will enable users to subscribe Monthly to Helena, to have access to our prediction markets. The following simple generic interface will be used in order to subscribe to our contract:

```
contract ISubscription { 
    function subscribe(address _target, uint256 _amount) external;
    function execute(address _account) external returns (bool);
    function setTarget(address _account) external; // Connection to Issuer SC

    // Internal epoch counter (cron)
    function height() public view returns (uint256)

}
```

Where:

* The `subscribe` function enable gives access (via `approve`)  to the pool to take DAI every epoch
* `Execute` is an external function called by our services to redirect DAI to the epoch Pool
* `setTarget` : sets the target contract to be executed whenever the payment is received. In Helena, this will mean &#x20;

### Issuer Contract

This contract takes the ownership of the issue function on P+, creating fresh new tokens if a successful execution comes from the susbcription contract, and letting the user participate in the prediction markets for a month.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://helena-network.gitbook.io/trl/core-modules/subscription.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
