> For the complete documentation index, see [llms.txt](https://rpslabs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rpslabs.gitbook.io/docs/using-lotto-sdk/for-developers/smart-contracts/rps-router.md).

# RPS Router

The RPSRouter is a contract designed to bridge user interactions between the native protocol contract and the RPS raffle contract. Customized for each integrated protocol, the ABI provided below serves merely as an illustrative example.

```solidity
function execute(
    bytes calldata data // call data for the target protocol,
    uint256 tradeAmount  // raffle tickets are generated based on this value
) external payable {}
```

Calls a function within the RPS raffle contract to automatically generate tickets for the sender, based on the Ether volume transferred. Additionally, it invokes the integrated protocol using the supplied calldata and carries out custom validations.
